The Mediterranean Sea is a marine desert: although it receives large nutrient inputs from a rapidly growing coastal population, its offshore waters exhibit extremely low biological productivity. Here, we use a mass balance modelling approach to analyse the sources and fate of the two main nutrients that support marine biomass production: phosphorus (P) and nitrogen (N). Surprisingly, the main source of P and N to the Mediterranean Sea is North Atlantic surface water entering through the Strait of Gibraltar, not emissions from surrounding land. The low biological productivity of the Mediterranean Sea is linked to the switch from less bioavailable nutrients entering the basin to highly bioavailable nutrients leaving it although similar amounts of total P and N enter and leave the Mediterranean Sea. This unique feature is a direct consequence of its unusual anti-estuarine circulation. An important environmental implication of the anti-estuarine circulation is that it efficiently removes excess anthropogenic nutrients entering the Mediterranean Sea, thus protecting offshore waters against eutrophication contrary to other semi-enclosed marine basins. In a similar vein, the "self-cleaning" nature of the Mediterranean Sea may prevent severe oxygen depletion of Mediterranean deep waters should ongoing climate warming lead to a weakening of the thermohaline circulation.Keywords: Mediterranean Sea, nutrients, phosphorus, nitrogen, mass balance modelling, circulation, climate and environmental change, deep-water oxygenation 1 Words or phrases marked for the first time in bold italics are defined in the glossary.