Upper Oligocene and lower Miocene, siliceous, organic‐, and phosphate‐rich sediments are widespread in Baja California Sur (Mexico). A representative section at La Purísima was analysed for its sedimentology, stratigraphy, geochemistry, and mineralogy. A corresponding age model was obtained by dating zircons from ash layers (27.84 ± 0.33 to 21.21 ± 0.59 Ma). The sediments were deposited in an upwelling‐dominated, hemipelagic setting, for which the presence of lamination, the scarcity of benthic organisms (except for in gravity‐flow deposits), and redox‐sensitive trace‐element enrichments indicate oxygen‐depleted conditions. Anoxic conditions were particularly strong around 27 and 24–22 Ma. Gravity‐flow deposits are frequent and predominantly composed of phosphatic‐coated grains. They were generated by seismic and volcanic activity, as is indicated by the close association with volcanic ash layers. The phosphatic‐coated particles were formed in a more proximal, better‐oxygenated shelf environment. They precipitated also in situ within the hemipelagic sediments, where they were often concentrated by subsequent winnowing. In situ phosphogenesis also partly cemented the gravity‐flow deposits. At La Purísima, phosphogenesis occurred throughout the time interval investigated and was particularly important around 28–25.5 and 23.5–21.5 Ma. These two time intervals correspond to the late Oligocene glacial maximum and the Oligocene–Miocene and early Miocene glacial intervals Mi1 and Mi1a. This provides evidence for the increasing importance of glacial denudation during the Oligocene, which led to an enhanced phosphorus flux into the ocean. Cooler climates also promoted the efficient transfer of phosphorus to thermocline waters by increased upwelling. Subsidiary phases of phosphogenesis during the intervening warm periods are explained by the weathering of glacial legacy sediments. These observations suggest that during the transition from greenhouse to icehouse conditions in the Oligocene and Miocene, new and radical changes in the global phosphorus cycle affected and partly inverted feedback mechanisms between climate, geochemical cycles and life, and profoundly influenced the biosphere and its evolution.