Wastewater from the city of Modesto, California, was once dumped into a river. Now, thanks to a new pipeline, it’s helping farmers survive drought and flooding new wetlands for migratory birds.

Wastewater recycling doesn’t have to be a fancy affair. Sometimes it can be as simple as building a pipeline.

That is more or less the full description of the North Valley Regional Recycled Water Project. Only a year after starting construction, at a cost of around $90 million, the project is already delivering recycled urban wastewater to farms and wildlife refuges in California’s San Joaquin Valley, providing a reliable new water supply to a drought-plagued region.

“Everything seems to be working great,” said Anthea Hansen, general manager of Del Puerto Water District, the farm irrigation agency that receives most of the recycled water. “We knew the benefits would be incredible, and we’re seeing it already.”

The project, which began delivering water in December, provides farmers in Hansen’s district with about 10,000 acre-feet of water. That’s roughly a 25 percent increase over what they were allocated this year by the federal Central Valley Project (CVP).

And since the source is a steady stream of urban wastewater, it’s an irrigation supply that won’t change much from year to year. In comparison, allocations of federal CVP water, managed by the U.S. Bureau of Reclamation, vary enormously depending on drought conditions, environmental issues and other factors.

“Because it’s not subject to pumping restrictions or measurements of snowpack or water in storage, the supply should be very constant,” Hansen said. “So it’s very meaningful.”

The water comes from the city of Modesto, population 213,000. The city was under regulatory pressure to upgrade its wastewater treatment to a so-called “tertiary” level, because its discharges to the San Joaquin River posed a threat to water quality and wildlife.

Hansen’s agency piggybacked on this need by offering to buy some of the newly refined wastewater for the district’s 200 or so farmers, who irrigate almonds, walnuts, peaches, pistachios and other crops. This offer helped Modesto finance the treatment plant upgrades. All Del Puerto had to do was build a pipeline 7 miles from Modesto’s treatment plant to the Delta-Mendota Canal, the federal ditch from which Del Puerto already diverts its federal irrigation water.

Building the pipeline didn’t take long, but the deal didn’t happen overnight. Del Puerto signed an initial agreement with Modesto in 2010 to cooperate on the project. Then there were regulatory hoops to jump through. Construction started on the pipeline in summer 2016 and took only a year to build.

Modesto’s initial recycled water deliveries to the project are expected to be about 15,000 acre-feet annually. Del Puerto farmers get about two-thirds of this water, which satisfies California’s Title 22, the state law that ensures treated wastewater is fit for landscaping and crops.

Some of the recycled wastewater is also going to state, federal and private wildlife refuges in the valley, thanks to a federal law known as the Central Valley Project Improvement Act. The law, passed in 1992, requires the United States Bureau of Reclamation to buy additional water supplies to benefit wildlife impacted by operation of the CVP irrigation system.

Reclamation has fallen far behind its obligations under the law, partly because of inadequate funding and scarce water supplies available for purchase. The availability of Modesto’s recycled water was a unique opportunity to acquire a firm new water supply.

“This is substantial,” said Ric Ortega, general manager of Grassland Water District, which delivers CVP water to a number of public and private wildlife refuges in the northern San Joaquin Valley. “This is a large quantity of water at a fraction of the cost of water on the open market. I would say less than half the cost.”

Ortega said he expects to get about 5,000 acre-feet of recycled water this year. This will benefit the private landowners in his district, including a number of duck club owners. It will also go to government wetland areas in the San Joaquin Valley such as the state-managed Grasslands Wildlife Area and Kern National Wildlife Refuge, which have suffered water shortages for decades due to the diversions caused by the Central Valley Project.

“We’re not meeting the dietary demands of shorebirds in the Central Valley in the spring,” Ortega said. “This will make huge strides as it relates to shorebirds.”

The Bureau of Reclamation invested about $25 million in the project. The partners also received a $27 million grant from Proposition 1, a 2014 bond measure approved by California voters for water projects. These two sources covered about half the cost to build the pipeline and pump station.

And there is more water to come. The city of Turlock, population 73,000, also plans to deliver recycled water to the new pipeline by linking to the system with a pipeline of its own.

As the two cities grow in the decades to come, their output of recycled water is sure to increase. The project’s current output could eventually more than triple to 48,000 acre-feet.

The share secured for refuges – an estimated 13,000 acre-feet when the project reaches full scale – will be the largest water supply dedicated to wildlife in the San Joaquin Valley in more than 25 years.

“All the pieces in this particular puzzle just seemed to fall into place,” said Hansen. “But I do think other agencies could definitely use it as a model. With creativity and thinking outside the box, it can be done.”