Phosphorus (P) is an essential nutrient to boost crop yields, but P runoff can cause nutrient over-enrichment in agricultural watersheds and can lead to irreversible effects on aquatic ecosystems and their biodiversity. Lake Erie is one prominent example as this watershed has experienced multiple episodes of harmful algal blooms over the last decades. Annual P loads crucially depend on yearly weather variations, which can create the risk of years with high runoff and excessive nutrient loads. Here we apply stochastic modeling to derive sustainable management strategies that balance crop yield optimization with environmental protection, while accounting for weather variability as well as weather trends as a result of climate change. We demonstrate that ignoring annual weather variations results in mitigation efforts for environmental pollution that are largely insufficient. Accounting explicitly for future variations in precipitation allows us to control the risk of emissions exceeding the P target loads. When realistic risk targets are imposed, we find that a package of additional measures is required to avoid P over-enrichment in the Lake Erie watershed. This package consists of a substantial reduction of P inputs (approximately 30% for different accepted risk levels), adoption of cover crops throughout the near- and mid-century, and cultivation of less nutrient-intensive crops (30% more soy at the expense of corn). Although climate change reinforces these conclusions, we find that the accepted risk level of exceeding P target loads is the predominant factor in defining a sustainable nutrient management policy.