COULD São Paulo run out of water? The idea of South America’s biggest metropolis, home to 20m people, lacking something so basic seems fanciful. Yet shortages this year have forced schools to suspend classes and restaurants to shut in smaller towns across São Paulo state, where a fifth of Brazilians live and a third of GDP is produced. For months taps in some neighbourhoods of the state capital itself have run dry, especially in the small hours. Unless the rains are unusually bountiful, a disaster looms in 2015.

Precipitation in 2014 was the lowest on record (see chart). In October, when rains normally resume, it was just a third of the normal amount. Things have improved since, but rainfall remains well below average. “Only a deluge can save São Paulo,” says Vicente Andreu, the chief of Brazil’s National Water Agency (ANA).

The drought is not the fault of São Paulo’s leaders, but they bear responsibility for the severity of its consequences. Investment has lagged behind the region’s needs. As reservoirs dried up Geraldo Alckmin, who was running for re-election as São Paulo’s governor (and won in October), took half-hearted measures to promote conservation. The average resident of the city of São Paulo still consumes roughly 200 litres of water a day, well above the 150 litres in much of Europe. Only now are politicians taking the crisis seriously.

The Cantareira reservoir system, on which 6.5m peopledepend, is down to 7.1% of its capacity. At this time in 2013 it was half-full. Alto Tietê, which supplies 4.5m people, this week tapped its strategic reserve (as Cantareira did in May). If it rains less than half the long-term average in the next few months, Cantareira will dry up by July, warns Brazil’s disaster-monitoring centre.

Forecasting is tricky, in part because São Paulo lies in a transition zone between Brazil’s more predictable north-eastern and southern regions. But there are reasons to be pessimistic. Climate change may make extreme weather more likely. The city of São Paulo creates a “heat island” that may be reducing rainfall in its surroundings, where most reservoirs lie, says Carlos Nobre of the Brazilian Academy of Sciences. Because of deforestation, water once captured by trees and funnelled into reservoirs is now lost in mudslides. The authorities should always prepare for the worst case, advises Mr Nobre.

They have not done that. Sabesp, the water utility majority-owned by the state government, invested 9.3 billion reais ($4 billion) in infrastructure in 1995-2013; 29 new reservoirs with a capacity of one-quarter of Cantareira’s are under construction in 15 cities. So is a link to a river basin 80km (50 miles) from the capital. That is well short of what is needed. Filled to the brim, Cantareira would last 220 days in the absence of inflows; its capacity should be increased to at least 550 days, reckons Rubem Porto of the University of São Paulo.

The response to the crisis has been inadequate in the eyes of many, including the ANA. In February Sabesp began offering a discount to people who cut their consumption by at least 20% from their 2013 usage. This, combined with public-awareness campaigns and reducing pressure to limit losses from leaks, led to a 17% drop in consumption. But before the election Sabesp avoided anything that smacked of rationing. As a result, one paulistano in four uses more water now than in 2013.

So far, the drought has done little economic damage. Harvests of sugar cane and other crops were disappointing but not calamitous. Industry, which consumes just 15% of water, has so far adapted. Thanks to years of investment Ambev, a big brewer, now needs 3.3 litres of water to make one of beer, down from 5 litres in 2002.

The main risk is that the drought will bring about rationing of electricity, 80% of which is generated by hydropower. During a drought in 2001 the government ordered a 20% cut in electricity consumption. If that happened again it would lop 0.5 percentage points off next year’s GDP growth, reckons Artur Passos of Itaú BBA, an investment bank. Thymos Energia, a consultancy, puts the risk of rationing at one in five. If Brazil’s economy were not on the verge of recession, it would be far higher.

With the electioneering over, politicians have started to act. Mr Alckmin, whose party leads the centre-right opposition to the federal government in Brasília, asked Brazil’s president, Dilma Rousseff (also re-elected in October), for federal help with projects that will cost 3.5 billion reais. These range from the humdrum (replacing leaky pipes) to the grand (canals to carry water from faraway rivers). On December 11th Mr Alckmin named a new water-resources secretary who, unlike his predecessor, is a hydrologist.

The governor has also offered (smaller) discounts to consumers who save less than 20%. But he unwisely resists imposing fines, which are a more effective way to cut consumption. São Paulo should also begin to charge for individual households’ water use; now meters just measure the consumption of blocks of flats.

If 2015 is as dry as 2014 has been, consumption will have to fall by a further two-fifths to keeps taps flowing, Mr Porto reckons. That is not an impossible goal, given the amount of water that paulistanos waste. If the weather turns wetter, it will be harder to impose such sacrifices. “The first thing that the rain washes away”, goes a saying from Brazil’s semi-arid north-east, “is memory of a drought.”