Families cool themselves off in a water stream in Lahore, Pakistan, in early June. (K.M. Chaudary/AP)

On May 27, in the date-growing ­desert town of Turbat in Baluchistan province, the temperature reached 128.3 degrees — the hottest ever reported in Pakistan. 

What followed was a month of intense heat and humidity nationwide coinciding with Ramadan, the Muslim period of fasting and prayer that ended Sunday. Every day, millions of sweltering Pakistanis struggled to forgo food and water from sunrise to sunset, then roused themselves before dawn to wash, pray, cook and eat.

The Ramadan ordeal has brought into sharp relief the chronic water and power shortages plaguing this arid, Muslim-majority country of 180 million. In cities, families had to fill jugs and bottles from public taps at 3 a.m. In villages, long daily electrical outages stopped fans from whirring and tube wells from pumping water to irrigate parched fields.

As the month dragged on, people lost patience. Violent protests broke out from the vast port city of Karachi to the hilly tribal region of Malakand. Electric-company offices were looted, ­police stations attacked, roads blocked. Prime Minister Nawaz Sharif ordered the electricity cuts shortened to several hours a day, but everyone knew that the move was only a temporary appeasement.

“Here I am, filling bottles while my kids wait in the car, because the water at home is not fit to drink,” fumed Shahadat Ali, 40, a printer lugging containers from a water station in the capital last week.

Families take turns filling containers at a public water station this month in Islamabad, Pakistan, where many neighborhoods faced water and power shortages during an exceptionally hot month of Ramadan. (Pamela Constable/The Washington Post)

“This should not be happening,” Ali said as sweat poured down his face. “It’s all because of politics and mismanagement. It’s a disgrace.”

In a village of wheat and peanut fields 40 miles west of the capital, Rafiq Mohammed rested on a string bed in 97-degree heat, cooling his water buffaloes under a shade tree. The farmer said he was used to a hard life with hot summers. But he, too, said he was angry at the Sharif government, which won election in 2013 promising to end the power shortages but has struggled to fulfill that pledge.

“In our house, we can only use one fan and one light,” said Mohammed, 52. “We need the tube wells, but we can’t run them without power. Even when there is no power at all, we still get big bills we can’t afford to pay. The authorities come to get our votes, but after that they disappear.”

For years Pakistan, an impoverished, mostly agricultural country with a fast-growing population, has faced a protracted problem of how to supply its farms, factories and urban households with water and power. But despite increasing public clamor and official investment, the shortages persist and are predicted to worsen.

Sharif’s government can hardly be accused of ignoring the power issue. He vowed to make the problem a top priority, having inherited a system in shambles — with massive thefts of electricity, power plants operating far below capacity and a huge built-up debt to oil companies and other creditors.  

Soon after taking office, Sharif ordered finance officials to repay the power debt of $480 million. Since then, he has focused on generating new power sources. Every few weeks, he appears on TV newscasts, inaugurating a new coal- or gas-fired plant. Many are being built in partnership with China, Pakistan’s major foreign investor.

But critics say the government has focused too narrowly on such high-profile projects, while failing to grapple with festering problems such as antiquated infrastructure and consumer theft via illegal hookups. They also note that power blackouts tend to be worse in rural areas, in part because cities have more influence.

“On the surface, it looks like there is not enough power, but the root issues are governance and mismanagement,” said Asad Umar, a legislator in the opposition Movement for Justice party who has led public protests over the problem. He said that the power debt has already crept back up to its 2013 level. “The market is not regulated, and investors are offered huge rates of return,” he said. “But if you can’t run the state efficiently, you can’t pass on the cost to the consumer.”

During a debate in the national legislature after the protests erupted, the minister for water and power, Khawaja Asif, complained that 89 percent of electricity was being stolen. He was met with cries of “Thief! Thief!” and an opposition lawmaker retorted, “Billions of rupees are taken from the people but no electricity is given, yet the people are called thieves.”

Pakistan’s water problem runs much deeper and has far more potential to devastate the country. Unlike power, water is a finite resource, highly vulnerable to global warming. Pakistan’s access to it depends partly on rivers from India, a hostile neighbor, and regionally on Himalayan glaciers that are beginning to melt. By mid-century, experts predict, the country could run out of water entirely. 

Many Pakistanis blame India for using dams to divert river water that, under a treaty signed in the 1960s, should be flowing into Pakistan. India has fought three wars with Pakistan, and people are concerned that the water dispute will intensify under Indian Prime Minister Narendra Modi, an ardent Hindu nationalist.

Yet according to experts, much of the water problem stems from domestic negligence and faulty policies.

Pakistan has five large dams and hundreds of small ones, with more planned or being built. But many are poorly maintained, and decrepit pipes leak millions of gallons. Fields are heavily flooded rather than using drip irrigation, thus wasting water and ruining the soil. River water has been diverted to cities, and mountain water has been pumped uphill at great cost.

“We blame India, but we can’t manage our own water,” said Arshad Abbasi, a water specialist at the Islamabad-based Sustainable Development Policy Institute. The water crisis, he said, “is really a crisis of bad governance and poor management. The politicians want to build big, visible projects, but nobody sees the pipes and underground problems that are deteriorating by the day.”

Even in the capital, where affluent homes are equipped with generators and rains from the nearby Margalla Hills frequently drench the streets, the water and power crisis during Ramadan was hard to miss. In the suburbs, people complained of waiting hours for lights to come on and of standing in long lines to fill bottles at night.

“This problem has been going on for years. If the leaders are sincere, they can solve it easily,” said Bedar Hussaini, 49, a pediatrician who was filling plastic jugs at a suburban water station. He said that enduring a hot Ramadan without water was frustrating but that the future worries him more. 

“We have had times when India wanted to go to war with us, but if they try to take our water, or if we run out of it, that will be worse than war,” he said. “If the water stops, there will be no crops, and people will die.”