The nitrogen cycle is as important in the ocean as it is on land. While the overall cycle is similar in both cases, there are different players and modes of transfer for nitrogen in the ocean. Nitrogen enters the ocean through precipitation, runoff, or as N from the atmosphere. Nitrogen cannot be utilized by phytoplankton as N so it must undergo nitrogen fixation which is performed predominantly by cyanobacteria. Without supplies of fixed nitrogen entering the marine cycle, the fixed nitrogen would be used up in about 2000 years. Phytoplankton need nitrogen in biologically available forms for the initial synthesis of organic matter. Ammonia and urea are released into the water by excretion from plankton. Nitrogen sources are removed from the euphotic zone by the downward movement of the organic matter. This can occur from sinking of phytoplankton, vertical mixing, or sinking of waste of vertical migrators. The sinking results in ammonia being introduced at lower depths below the euphotic zone. Bacteria are able to convert ammonia to nitrite and nitrate but they are inhibited by light so this must occur below the euphotic zone. Ammonification or mineralization is performed by bacteria to convert organic nitrogen to ammonia. Nitrification can then occur to convert the ammonium to nitrite and nitrate. Nitrate can be returned to the euphotic zone by vertical mixing and upwelling where it can be taken up by phytoplankton to continue the cycle. N can be returned to the atmosphere through denitrification.
Ammonium is thought to be the preferred source of fixed nitrogen for phytoplankton because its assimilation does not involve a redox reaction and therefore requires little energy. Nitrate requires a redox reaction for assimilation but is more abundant so most phytoplankton have adapted to have the enzymes necessary to undertake this reduction (nitrate reductase). There are a few notable and well-known exceptions that include most Prochlorococcus and some Synechococcus that can only take up nitrogen as ammonium.
Phosphorus is an essential nutrient for plants and animals. Phosphorus is a limiting nutrient for aquatic organisms. Phosphorus forms parts of important life-sustaining molecules that are very common in the biosphere. Phosphorus does enter the atmosphere in very small amounts when the dust is dissolved in rainwater and seaspray but remains mostly on land and in rock and soil minerals. Eighty per cent of the mined phosphorus is used to make fertilizers. Phosphates from fertilizers, sewage and detergents can cause pollution in lakes and streams. Over-enrichment of phosphate in both fresh and inshore marine waters can lead to massive algae blooms which, when they die and decay leads to eutrophication of freshwaters only. Recent research suggests that the predominant pollutant responsible for algal blooms in saltwater estuaries and coastal marine habitats is nitrogen.
Phosphorus  occurs most abundantly in nature as part of the orthophosphate ion (PO), consisting of a P atom and 4 oxygen atoms. On land most phosphorus is found in rocks and minerals. Phosphorus-rich deposits have generally formed in the ocean or from guano, and over time, geologic processes bring ocean sediments to land. Weathering of rocks and minerals release phosphorus in a soluble form where it is taken up by plants, and it is transformed into organic compounds.  The plants may then be consumed by herbivores and the phosphorus is either incorporated into their tissues or excreted. After death, the animal or plant decays, and phosphorus is returned to the soil where a large part of the phosphorus is transformed into insoluble compounds. Runoff may carry a small part of the phosphorus back to the ocean.