The residual melts that remained after the consolidation of the Jálama batholith crystallized to form a group of intra-granitic pegmatite dykes, which are hosted by its outermost facies (the External Unit), and the most evolved residual melts migrated through fractures to form the Cruz del Rayo field of pegmatite dykes, which are hosted by pre-Ordovician low-grade metasedimentary rocks. The increasing activity of phosphorus as magmatic differentiation took place led to the crystallization of primary phosphates, including members of the triplite–zwieselite and the amblygonite–montebrasite series. A strong albitization of the granitic and pegmatite rocks led to the replacement of the primary assemblage by other phosphates such as alluaudite. The influx of post-magmatic hydrothermal fluids, produced quartz veins, gave rise to the crystallization of ore minerals and triplite, and altered the granites, aplites and pegmatites, replacing some of the phosphate minerals and feldspars and depositing goyazite, montebrasite and childrenite–eosphorite. The interaction of the residual hydrothermal fluids with those from the surrounding metamorphic rocks during later alteration events resulted in the influx of large quantities of Ca and Mg, and produced phosphate assemblages enriched in those elements. Finally, late goyazite, hydroxylapatite and an unidentified Fe-rich phosphate were formed as a result of supergene alteration by percolating meteoric waters, which added Ca, Sr and other elements into the system, and increased fO2.