Between the two nations, Brazil and the U.S. have one fifth of the world’s freshwater reserves, and yet both are facing historic water crises.

After two years of dry rainy seasons, the 20 million residents of greater Sao Paulo, the largest city in the Americas, are facing intermittent disruptions in water supply and could see strict rations—or even delivery by truck—during the coming years. In California, Governor Jerry Brown ordered consumption cuts last Wednesday that could affect all 39 million residents of the state. It was the first state-wide rationing in the Golden State’s history.

That Sao Paulo and California – large swathes of which share the Brazilian city’s sub-tropical climate – have run dry is bracing proof of what people like “Aguanomics” blogger and economics professor David Zetland have argued for years: no one can take their water supply for granted any more.

Most people consider access to water a basic human right; in the age of climate change, economic planners are struggling to balance that concept with the laws of supply and demand.

If any nation had cause to be complacent, it was Brazil. In fact, the water shortages the country is suffering from are in part due to the complacency of the area’s city and regional planners. For years, they made do with leaky pipes—a 2014 study by non-profit sanitation advocate Instituto Trata Brasil found that more than one third of the city of Sao Paulo’s water was lost between the treatment plant and consumers’ faucets.

Sao Paulo (and California) were blindsided by the same thing that caused water crises in Spain and Australia in recent years: a sudden change in weather patterns; changes that may very well last for a long time. Now, Brazil and California may adopt some of the fixes that these countries pursued. And Brazil may go even further, accelerating efforts to tap the waters of the Amazon regions on its western frontier for the benefit of the densely populated southeast part of the country.

A report from intelligence analysis firm Stratfor went so far as to argue that Sao Paulo’s drought could even benefit Brazil, because it may very well provide “the necessary momentum” to implement plans of infrastructure repair, costly projects that politicians had little incentive to demand during times of plenty.

How did the ‘Saudi Arabia of water’ run so dry?

Brazil has been called the “Saudi Arabia of water”—hydro power produces as much as 70% of its electricity, according to Moody’s Investors Service, and Goldman Sachs estimates that the nation sits on 13% of the world’s accessible fresh water. The superlative may come back to haunt the citizens of Sao Paolo during the coming dry season, however, as city authorities may be reduced to trucking water to neighborhoods in water tankers—a method used in some parts of Saudi.

For decades, the city received an ample supply from reservoirs in the hinterland, with about 10 million people receiving water from the Cantareira system to the north. The Cantareira system is comprised of five reservoirs, each tipping into the other like a series of overflow ponds on a tiered water garden. Water is then pumped up a mountain into a sixth reservoir, which in turn feeds into the city’s main water treatment plant.

Even after deluges in the last few weeks, the Cantareira System is at 19% of capacity, according to the Associated Press. That could go to zero in the dry season of the next three months. The utility that manages the city’s water, Sabesp, or Companhia de Saneamento Basico do estado de Sao Paulo, reportedly laid extra pipe in the reservoir, like a thirsty drinker extending the flex of his straw to retrieve the very last drops at the bottom of the glass. Sabesp did not respond to a request for comment.

The drought began during the 2013-2014 rainy season and lasted through late February, the worst dry spell in 80 years. After two years of rain failure, Sao Paulo may have to consider whether things will ever return to “normal.”

“It’s very, very hard to say this particular event is related to climate change … but one thing we know for sure [is that global warming] is making the climate events more extreme, and those extreme climate events more frequent,” said Claudio Maretti, leader of the World Wildlife Fund’s Living Amazon project, in an interview from Brasilia. “You cannot just use the traditional rainfall pattern to calculate what’s happening…. You need to consider the changes that are arriving.”

If Sao Paulo’s Cantareira system runs dry, the isolated events of recent months—such as supply interruption, the unauthorized drilling of private wells, water hoarding, and the spread of dengue fever via standing water—could become more widespread.

Looking to Ireland and Australia

Sao Paulo and California could follow the example of another water-surplus nation embarrassed by a water crisis: Ireland. In November 2013, the city of Dublin’s Victorian water-infrastructure was overcome by demand, which led to rationing measures.

In response, Ireland increased the price of water, with a new “semi-state” water corporation imposing rates on all Irish households for the first time in a generation so it could mend leaky pipes and explore other sources to complement Dublin’s existing reservoirs.

Indeed, Sabesp recently applied for approval of a drastic water rate hike to encourage conservation and help pay for emergency measures. But regulators may be mindful of the protests that have met the new water charges in Ireland – particularly in light of 2013 mass marches in Sao Paulo and Rio de Janeiro protesting hikes to bus and train ticket prices.

“Uncertainties loom as to: i) how much (the regulator) will allow the company to recover; and ii) how soon (i.e., now in the annual April tariff adjustment anniversary, or in April 2017 in the 5-year tariff reset, or sometime in between?),” wrote Lilyanna Yang, an analyst at brokerage UBS, in a note to clients.

David Zetland, a professor of economics at Leiden University College in the Netherlands and author of The End of Abundance, Economic Solutions to Water Scarcity, said the hike – even if it passes muster – is likely “too little, too late.”

In the short term, Sao Paulo could well enforce rationing as California has done. If the rains fail again next year, Brazil may need to resort to more extreme measures. Sao Paulo could ship in water, as Barcelona did in 2008, said Zetland. That summer, tanker ships from Marseille docked at the Catalonian port. Brazil could conceivably fill ships at the mouth of the Amazon and pump the water from the tankers into mains as temporary infusions, Zetland said. But if people know the water in their tap is finite, they will hoard it in bath tubs, quickly.

If it reaches that extreme, simply shutting off the mains and trucking in water supplies might be better than turning the mains on and off. “If you tell people to use less and they don’t, you’re in trouble,” Zetland said. “The only other way you could do rationing is turning water on and off to different neighborhoods. The problem with that is you’re going to lose a lot of water to leakage and [that’s] going to do lot of damage to the pipes because pressure changes can crack pipes.”

In the medium term, two of the wettest nations in the world could follow the example of the driest nation in the world, which made water security a top national priority after the “millennium drought” of 2001 to 2009. Australia invested heavily in water infrastructure, like desalination plants, and established a national market for water, where investors and users can now buy and sell futures of H2O as they would of oil or other scarce commodities. Already, in California, where farmers are by far the largest users of water, some agricultural communities allow farmers to trade rights. As in the Australian drought, the price per acre foot has spiraled higher in recent months.

Giving water a rethink

Above all, observers say, Australians changed the way they thought about water.

“I believe the situation in Brazil is indicative of a more widespread problem – our failure to assign an economic value to water which reflects its vital nature and scarcity,” said Tom Rooney, chief executive of Australian water brokerage and futures-exchange operator Waterfind, in a recent e-mail.

Zetland says Brazil has run into the same “wall” as Australia did during its drought and should adopt a similar urgency to its water planning.

The “commodification” of water beyond Australia, if it happens, could take decades and will involve bitter debate over public and private use. But Brazil and other “water surplus” nations are already trying to eke out economic benefits from their supplies.

Brazil has sought to capitalize on its aquatic abundance in the Amazon basin, which accounts for as much as 20% of the world’s flowing water. Belo Monte, a massive hydro-power dam complex – one of the world’s largest – on the Amazonian tributary, the Xingu river, will transmit electricity to Sao Paulo via the national grid. That could divert water from hydro power plants around Sao Paulo back to the drinking supply.

Maretti of WWF warns that increased exploitation of Brazil’s water must be handled with much greater care than the Belo Monte dam. There was no effort to integrate that dam with others in the region to ensure that local supplies were not harmed, he said. While the footprint of the dam itself was considered, the roads and other ancillary installations have caused unplanned deforestation, according to Maretti. And deforestation could be one of the root causes of the drought in the first place.

The loss of trees in the Amazon basin has not only affected carbon levels in the world’s atmosphere but also water-vapor levels in South America, said Maretti. Recent studies suggest that the depletion of the Amazon forest has slowed the flow of “flying rivers”—vapor carried on prevailing winds from the rain forest to Sao Paulo, Buenos Aires, and other regions. Trees also help maintain the integrity of river flow, he said. Maretti advocates for replanting trees, not only in the Amazon regions but also along the rivers that feed into Sao Paulo’s reservoirs, as a long-term response to the drought.

Matters in California are not quite as dire as they are in Sao Paulo, said Zetland. Nevertheless, officials on the West Coast will likely watch the response on Brazil’s Southeast coast with interest.

Watch more business news from Fortune: