The shrunken carcasses of cows lie in scorched fields outside the city of Campina Grande in northeast Brazil, and hungry goats search for food on the cracked-earth floor of the Boqueirao reservoir that serves the desperate town.

After five years of drought, farmer Edivaldo Brito says he cannot remember when the Boqueirão reservoir was last full. But he has never seen it this empty.

"We've lost everything: bananas, beans, potatoes," Brito said. "We have to walk 3 kilometers just to wash clothes."

Brazil's arid northeast is weathering its worst drought on record and Campina Grande, which has 400,000 residents that depend on the reservoir, is running out of water.

After two years of rationing, residents complain that water from the reservoir is dirty, smelly and undrinkable. Those who can afford to do so buy bottled water to cook, wash their teeth with, and even to give their pets.

The reservoir is down to 4 percent of capacity and rainfall is expected to be sparse this year.

"If it does not fill up, the city's water system will collapse by mid-year," says Janiro Costa Rêgo, an expert on water resources and hydraulics professor at Campina Grande's federal university. "It would be a holocaust. You would have to evacuate the city."

Brazil's government says help is on the way.

Rerouting the River

After decades of promises and years of delays, the government says the rerouting of Brazil's longest river, the São Francisco, will soon relieve Campina Grande and desperate farmers in four parched northeastern states.

Water will be pumped over hills and through 400 kilometers of canals into dry river basins in Ceará, Rio Grande do Norte, Pernambuco, and Paraíba, the small state of which Campina Grande is the second-biggest city.

Begun in 2005 by leftist president Luiz Inacio Lula da Silva, the project has been delayed by political squabbles, corruption and cost-overruns of billions of dollars.

Brazil's ongoing recession, which economists calculate has shrunk the economy of the impoverished northeast by over four percent during each of the past two years, made things even worse.

Now, President Michel Temer is speeding up completion of the project, perhaps his best opportunity to boost support for his unpopular government in a region long-dominated by native-son Lula and his leftist Workers Party.

In early March, Temer plans to open a canal that will feed Campina Grande's reservoir at the town of Monteiro. The water will still take weeks to flow down the dry bed of the Paraíba river to Boqueirão.

With the quality of water in Campina Grande dropping by the day, it is a race against time.

Professor Costa Rêgo says the reservoir water will become untreatable by March and could harm residents who cannot afford bottled water.

Helder Barbalho, Temer's minister in charge of the project, says the government is confident the water will arrive on schedule.

"We have to deliver the water by April at all costs," he said.

Climate Change

Climate change has worsened the droughts in Brazil's northeast over the last 30 years, according to Eduardo Martins, head of Funceme, Ceará state's meteorological agency.

Rainfall has decreased and temperatures have risen, increasing demand for agricultural irrigation just as water supplies fell and evaporation accelerated.

Costa Rêgo blames lack of planning by Brazil's governments for persistent and repeated water crises, shocking for a country that boasts the biggest fresh water reserves on the planet.

The reservoir supplying São Paulo, Brazil's largest city and a metropolitan region of 20 million people, nearly dried up in 2015. The capital, Brasilia, resorted to rationing this year.

In Fortaleza, capital of Ceará and the northeast's second largest city, the vital Castanhão reservoir is down to 5 percent of its capacity.

While that city will also get water from the São Francisco project, it will not arrive until at least year-end because contractor Mendes Junior abandoned work after being implicated in a major corruption scandal.

"Water from the São Francisco river is vital," Ceará Governor Camilo Santana told Reuters. He said the reservoir can supply Ceará only until August.

After that, the state must use emergency wells and a mandatory 20 percent reduction in consumption to keep Fortaleza taps running until water arrives.

Rationing

Ceará has had to cut back on irrigation, hurting flower and melon exporters, cattle ranchers and dairy farmers. They stand to flourish when the transfer comes through, but quenching the thirst of the cities will take priority.

In Campina Grande, a textile center, companies including industry leaders Coteminas and Alpargatas have curtailed expansion plans and drastically cut back consumption by recycling the water they use.

There, too, new water will first go towards solving the crisis in Campina Grande and surrounding towns. Only then will officials think about agriculture.

"First we have to satisfy the thirst of urban consumers. Only then can we think of producing wealth," said Joao Fernandes da Silva, the top water management official in Paraíba.

Rationing has particularly hurt poorer urban families. Many have no running water or water tanks and instead store water in plastic bottles.

For those who have waited decades for the São Francisco transfer, they will believe it only when they see the water flow.

Brito said he and his neighbors survive on the social programs that were the hallmark of Lula and his Workers Party administration. Though tainted by corruption allegations, Lula remains Brazil's most popular politician ahead of presidential elections next year.

"Without the Bolsa Familia program, we would be dying of hunger," said Brito, who believes shortages could persist even after the river transfer. "It's political season again, so they promise us water, just for our votes."