A Langmuir monolayer of stearic acid on pure water and in the presence of certain divalent metal ions such as Cd and Pb at pH approximately 6.5 of the subphase water collapses at constant area, while for other divalent ions such as Mg, Co, Zn, and Mn at the same subphase pH the monolayer collapses nearly at constant pressure. Films of stearic acid with Cd, Pb, Mn, and Co in the subphase (at pH approximately 6.5) have been transferred onto hydrophilic Si(001) using a horizontal deposition technique, just after and long after collapse. Electron density profiles obtained from X-ray reflectivity analysis show that a three-molecular-layer structure starts to form just after constant area collapse, where in the lowest molecular layer, in contact with the substrate, molecules are in asymmetric configuration, i.e., both hydrocarbon tails are on the same side of the metal-bearing headgroup that touches the substrate, while the molecules above the first layer are in symmetric conformation of the tails with respect to the headgroups. Further along collapse, when the surface pressure starts to rise again with a decrease in area, more layers with molecules in the symmetric configuration are added, but the coverage is poor. On the other hand, only bimolecular layers form after constant pressure collapse, with the lower and upper layers having molecules in asymmetric and symmetric configurations, respectively, and the upper molecular layer density increases with compression of the monolayer after collapse. A "Ries mechanism" for constant area collapse and a "folding and sliding mechanism" for constant pressure collapse have been proposed.