A classical theorem of Kirchhoff expresses the number of spanning trees of a graph via the determinant of some matrix related to its adjacency matrix. A knot-theoretical version of this theorem relates two formulas expressing the lowest term of the Alexander-Conway polynomial of a link via linking numbers of its components. If the link is algebraically split (i.e. all linking numbers are zero), the lowest term can be expressed via Milnor's triple linking numbers. Comparing these answers we obtain a new matrix-tree theorem, relating enumeration of spanning trees in a 3-graph and the Pfaffian of a certain skew-symmetric matrix related to it. This result may be generalized to higher order terms using the theory of finite type (Vassiliev) invariants and Feynman diagrams.