All life is built from about 30 of the chemical elements in the periodic table. We are mostly composed of carbon, oxygen and hydrogen. But two other elements are of critical importance—nitrogen and phosphorus. These are integral parts of our DNA and protein. We add lots of nitrogen and phosphorus fertilizers to agricultural soils to make sure that crops grow well and their food is nutritious for us. You will find that the dominant ingredients in your garden fertilizer are also nitrogen and phosphorus, which are often in short supply for optimal plant growth.
Nitrogen and phosphorus are needed in a particular proportion in living tissue. Plants, including most crops, need 23 atoms of nitrogen for every atom of phosphorus taken up from the soil. Humans need only about 4 atoms of nitrogen for each atom of phosphorus. We feed on foods that are relatively rich in nitrogen, accumulate the phosphorus, and excrete the extra nitrogen as urea.
Humans add about 200 million metric tons of nitrogen to the soil through the production of fertilizer and cultivation of leguminous crops. Thus, it is no surprise that the annual production of phosphorus fertilizer amounts to about 20 million tons—which satisfies the proportional (i.e., 23 to 1) demand for nitrogen and phosphorus in crop plants.
The nitrogen in fertilizer is obtained from the atmosphere, which is 78% nitrogen, by several reactions that collectively use a lot of fossil fuel energy. As long as we have abundant natural gas, the supply of nitrogen is virtually limitless. Phosphorus, however, is more problematic. The crust of the Earth contains about 0.076% phosphorus. Phosphorus is mined from local deposits of certain rocks that contain high concentrations of a phosphorus-rich mineral known as apatite, largely laid down in sediments in ancient oceans. In the United States, the major deposits of phosphate rock are found in North Carolina and Florida. The overwhelming deposits of phosphate rock, nearly 75% of the global supply are found in Morocco.
At the present rate of extraction, the global phosphorus supply for fertilizer will last about 300 years. We are not in immediate danger of running out of phosphorus. But, unlike nitrogen, the supply of phosphorus has limits—when it’s gone, it will be very difficult to supply phosphorus to crops without major expense, and there is no substitute. At the current rates of extraction, Morocco will soon retain a stranglehold on the global supply of phosphorus—not a healthy situation for security of the world’s food production.
While some phosphorus fertilizer is retained in the soil, the rest is removed in the harvest of crops and finds its way to water bodies via the waste of humans. Thus, better recovery of phosphorus from waste waters would have three benefits: 1) cleaner water, which would prevent the eutrophication of rivers, lakes and coastal waters, 2) recycled phosphorus that could be used again to fertilize crops, and 3) generation of energy in the form of methane from anaerobic digestion. At least one group of environmental scientists views waste water as a valuable resource, not a disposal problem. For one sewage treatment plant in Arizona, phosphorus recovery could potentially net $150,000 each year for return to the local community. Phosphorus is too valuable to be lost to the sea, where the deposition of phosphorus-rich sediments is dwarfed by current human demand. 
Chen, M. and T. E. Graedel. 2016. A half-century of global phosphorus flows, stocks, production, consumption, recycling and environmental impacts. Global Environmental Change 36: 139-152.
Cooper, J., R. Lombardi, D. Boardman, C. Carliell-Marquet. 2011. The future distribution and production of global phosphate rock reserves. Resource Conservation and Recycling 57: 78-86.
Li, W.-W., H.-Q. Yu and B.E. Rittmann. 2015. Reuse water pollutants. Nature 528: 29-31.
Liu, Y., G. Villalba, R.U. Ayers, and H. Schroeder. 2008. Global phosphorus flows and environmental impacts from a consumption perspective. Journal of Industrial Ecology 12: 229-247.
Schlesinger, W.H. and E.S. Bernhardt. 2013. Biogeochemistry: An analysis of global change. 3rd.ed. Academic Press/Elsevier, New York.
Venkatesam. A.K., A.-H. Hamdan, V.M. Chavez, J.D. Brown and R.U. Haiden. 2016. Mass-balance model for sustainable phosphorus recovery in a US wastewater treatment plant. Journal of Environmental Quality 45: 84-89.
Villalba, G., Y. Liu, H. Schroeder, and R.U. Ayers. 2008. Global phosphorus flows in the industrial economy from a production perspective. Journal of Industrial Ecology 12: 557-569.
Zhang, W., D.P. Swaney, B. Hong, R.W. Howarth, H. Han and X. Li. 2015. Net anthropogenic phosphorus inputs and riverine phosphorus fluxes in highly populated headwater watersheds in China. Biogeochemistry 126: 269-283.
 200 million tons of nitrogen is equivalent to 14.3 million moles (atoms) of N. An N/P ratio of 23 indicates a demand for 0.62 million moles of P, which is equivalent to 19.2 million tons. Nearly all of the mined phosphorus is used in fertilizer; the remainder is found in detergents, surfactants and specialty chemicals.
 About 2.5 million tons of phosphorus is deposited in ocean sediments each year (Schlesinger and Bernhardt 2013, p. 462) versus mining of 20 million tons.