The Cove Point Lighthouse is seen in Lusby, Md., in this file photo. (Ricky Carioti/The Washington Post)

Government leaders in the Chesapeake Bay watershed on Monday signed a broad agreement to restore the health of its waters, as the blue crab and oyster populations continue to fluctuate and scientists complain about toxins that are changing the sex of fish.

The Chesapeake Watershed Agreement is the third signed since the 1980s by the six watershed states — Maryland, Virginia, Delaware, West Virginia, Pennsylvania and New York — and the District.

Unlike in the previous agreements, the governors and mayor who signed it vowed to go beyond limiting the amount of pollution that rolls into bay tributaries from cities and farms. They pledged to investigate the effects of chemical contamination and toxins, look at how land use impedes the bay’s improvement and study the threat of sea-level rise.

Maryland Gov. Martin O’Malley (D), who spearheaded the effort, called it “the most inclusive, collaborative, goal-oriented agreement the Chesapeake Bay watershed has ever seen.” Not only does the pact address water quality, he said, “it also confronts critical emerging issues,” such as climate change, that previous agreements failed to consider.

The plan seeks to restore the bay by 2025. It requires cities to improve aging sewers to stop massive overflows and says livestock farms must limit manure flow during rain.

The Chesapeake Bay is the nation’s largest estuary, where salt water and fresh water mix to create a diverse abundance of marine life. The watershed covers 64,000 square miles and is crucial to Maryland and Virginia, which rely on the bay’s crab and oyster fisheries and its recreational opportunities.

For significant portions of each year, however, those waters are dangerous. Each time it rains, city and suburban sewer systems send a deluge of storm water mixed with raw sewage from wastewater treatment pipes. Health officials warn against swimming until three days after storms.

And in each spring planting season, runoff from farms laces the water with fertilizers and other chemicals that are thought to affect fish. On top of all that, home building, commercial development and farm expansion has robbed the watershed of forested land that can filter runoff that carries pollutants.

Water quality is being considered as a possible factor in the disappointing results of the latest blue crab survey . More than a quarter of the crabs perished in one of the worst winter die-offs recorded in the bay. Female crabs were hardest hit. Only 69 million were counted by Virginia and Maryland researchers, well below the threshold needed to sustain the region’s crab population.

But according to the Chesapeake Bay Foundation’s 2012 State of the Bay report, there’s also good news: The bay’s waters are improving. The report credited a federal “pollution diet” orchestrated by the Environmental Protection Agency and implemented by watershed governments.

The pollution diet is being challenged in court by the American Farm Bureau Federation, which argues that the plan should be voided because the watershed is under the jurisdiction of the states.

The EPA responded that watershed states are guiding the effort and sought federal intervention only after voluntary agreements failed to restore the bay’s health. The farm bureau lost in federal court but has filed an appeal, backed by 21 attorneys general. The agreement signed Monday underscores the EPA’s argument that the states are taking charge, supporters said.

In 90 days, the states and the District are to decide which jurisdiction will take the lead in trying to implement each priority of the agreement — land use, water restoration, scientific studies. In a year, they are expected to show the progress they have made toward those goals. Those two requirements were not part of prior agreements.

“The next 90 days are critical,” said William Baker, president of the Chesapeake Bay Foundation. “Previous agreements had no details. It was trust as opposed to ‘Here’s what we’re going to do.’ I have guarded optimism. I want to trust and have them verify that trust.”