The method of ab initio molecular dynamics, based on finite-temperatur
e density-functional theory, is used to study the nonmetal-metal trans
ition in two different metal-molten-salt solutions, K-x(KCl)(1-x) and
Na(NaBr)(1-x). As the excess metal concentration is increased the elec
tronic density becomes delocalized and percolating conducting paths ar
e formed, making a significant dc electrical conductivity possible. Th
is marks the onset of metallic regime. By calculating several electron
ic and structural properties, remarkable differences between the two s
olutions are observed. The anomalous behavior of Na(NaBr)(1-x), typica
l of all the Na-NaY solutions, is found to be related to the strong at
tractive interaction between the sodium ions and the excess electrons.