The Phalaborwa world-class phosphate deposit (South Africa) is hosted by a Paleoproterozoic alkaline complex mainly composed of phoscorite, carbonatite, pyroxenitic rocks, and subordinate fenite. In addition, syenite and trachyte occur in numerous satellite bodies. New petrological and in-situ geochemical data along with O and Sr isotope data obtained on apatite demonstrate that apatite is in the principal host rocks (pyroxenitic rocks, phoscorite and carbonatite) formed primarily by igneous processes from mantle-derived carbonatitic magmas. Early-formed magmatic apatite is particularly enriched in light rare earth elements (LREE), with a decrease in the REE content ascribed to magma differentiation and early apatite fractionation in isolated interstitial melt pockets. Rayleigh fractionation favored a slight increase in δ18O (below 1%) at a constant Sr isotopic composition. Intrusion of fresh carbonatitic magma into earlier-formed carbonatite bodies locally induced re-equilibration of early apatite with REE enrichment but at constant O and Sr isotopic compositions. In fenite, syenite and trachyte, apatite displays alteration textures and LREE depletion, reflecting interaction with fluids. A marked decrease in δ18O in apatite from syenite and trachyte indicates a contribution from δ18O-depleted meteoric fluids. This is consistent with the epizonal emplacement of the satellite bodies. The general increase of the Sr isotope ratios in apatite in these rocks reflects progressive interaction with the country rocks over time. This study made it possible to decipher, with unmatched precision, the succession of geological processes that led to one of the most important phosphate deposits worldwide.