Barcelona is a dry city. It is dry in a way that two days of showers can do nothing to alleviate. The Catalan capital's weather can change from one day to the next, but its climate, like that of the whole Mediterranean region, is inexorably warming up and drying out. And in the process this most modern of cities is living through a crisis that offers a disturbing glimpse of metropolitan futures everywhere.

Its fountains and beach showers are dry, its ornamental lakes and private swimming pools drained and hosepipes banned. Children are now being taught how to save water as part of their school day. This iconic, avant-garde city is in the grip of the worst drought since records began and is bringing the climate crisis that has blighted cities in Australia and throughout the Third World to Europe. A resource that most Europeans have grown up taking for granted now dominates conversation. Nearly half of Catalans say water is the region's main problem, more worrying than terrorism, economic slowdown or even the populists' favourite – immigration.

The political battles now breaking out here could be a foretaste of the water wars that scientists and policymakers have warned us will be commonplace in the coming decades. The emergency water-saving measures Barcelona adopted after winter rains failed for a second year running have not been enough. The city has had to set up a "water bridge" and is shipping in water for the first time in the history of this great maritime city.

Download the new Independent Premium app Sharing the full story, not just the headlines

A tanker from Marseilles with 36 million litres of drinking water unloaded its first cargo this week, one of a mini-fleet contracted to bring water from the Rhone every few days for at least the next three months. So humbled was Barcelona when prolonged drought forced it to ship in domestic water from Tarragona, 50 miles south along the Catalan coast, 12 days ago, that city hall almost delayed shipment and considered an upbeat publicity campaign to lift morale and international prestige.

The whole country is suffering from its worst drought in 40 years and the shipments from Tarragona prompted an outcry from regions who insist they need it more. For now the clashes are being soothed by intervention from Madrid, and plans to ship water from desalination plants in parched Almeria in Andalusia are shelved until October. But there is little indication of a strategy to deal not just with an immediate emergency but an ongoing crisis. Buying water on an epic scale from France has given the controversy an international aspect as French environmentalists question whether such a scarce natural resource should be sold as a commodity to another country.

"It would be a mistake to consider this water bridge between Marseilles and Catalonia as simply an operation of solidarity," said a group of ecologists calling themselves Robin des Bois (Robin Hood). They said the commercial deal struck between private contractors failed to consider the environmental impact on France. The organisation blamed Barcelona's water shortage on "wasted resources and ... lack of foresight by Catalan and Spanish authorities".

What Barcelona authorities are fast discovering is that chronic water shortages are not a problem that money alone can solve.

Its 5.5 million inhabitants need a lot of the stuff: the 20 million litres/20,000 tonnes/five million gallons of water brought from Tarragona on 13 May were enough for barely 180,000 people and were consumed within minutes of being channelled through the city's taps. Wednesday's shipment from Marseilles was bigger, 36 million litres, but similarly short lived.

Barcelona has churned up a whirlpool of controversy over its handling of the water crisis, causing just the spray of negative publicity it hoped to avoid.

Even the arrival of rain has only made things worse. Catalonia's regional environment minister, Francesc Baltasar, rushed to announce last week that the hosepipe ban and swimming pool restrictions imposed in February would be lifted. Tarragona – whose wells supply shipped-in water – protested furiously. "Barcelona fills its swimming pools with water from Tarragona," local headlines screamed, and the water authority demanded a halt to pumping Tarragona's water for the Catalan capital.

Daily coronavirus briefing No hype, just the advice and analysis you need Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive morning headlines Monday - Friday plus breaking news alerts by email Update newsletter preferences

Jose Montilla, Catalonia's regional prime minister, countermanded Mr Baltasar and insisted water-saving measures remain. "Obviously it makes little sense to lift certain measures when, if it stops raining, we'll have to re-impose them in three weeks' time," he said. But Tarragona re-opened the tap only after Mr Montilla visited, and insisted that "this effort of solidarity will supply only our basic needs".

Barcelona's daily El Periodico called Mr Baltasar's proposal to end unpopular water-saving measures "irresponsible and demagogic", increasing resentments in regions supplying water to Barcelona. The shipments themselves came under fire. Importing water gives the city a "lamentable, depressing image" and spreads "alarmism", Miguel Angel Fraile, secretary of the Catalan Trade Confederation, said.

With reservoirs now filled to 30 per cent, authorities should scrap the plan and ship in water only as a last resort, he said. But reservoirs remain two-thirds empty, half the national average and far lower than usual for May. These are dangerously low in anticipation of another dry summer, raising the ghastly prospect of water rationing – painful for residents and offputting for summer visitors.

Extreme short-term measures might have been averted had Barcelona mended leaky old pipes and filtered polluted aquifers, critics grumble. But Barcelona is among Europe's most careful water users, better than Madrid, Milan or Paris, La Vanguardia newspaper argues. Residents adapt their loos to flush less, shower rather than bath and brush their teeth without the tap running, but such individual measures are swamped by industrial usage, and waste in the infrastructure. La Vanguardia urges an immediate public works programme to improve the creaking system.

"People are much more aware of the need to save water," says Bridget King, a South African who settled in Barcelona 20 years ago to teach English. "We put a bucket under the shower to catch water before it heats up, and have stopped buying petunias that need a lot of watering. It's a constant topic of conversation and we worry it's a long-term thing. But as a South African I'm appalled to see people wash dishes under the running tap. I was brought up to be very careful with water. And although we feel relieved it's started raining, everyone knows it's only short term and probably not enough."

Recent rains have sharpened conflicts, offering a foretaste of water wars to come. Aragon straddles the mighty Ebro river but is a parched desert, cultivable only by sophisticated irrigation systems managed by an Association of Irrigators. This ancient brotherhood agreed to sell the surplus from its irrigation quota, which usually flows back into the Ebro, to Barcelona as a short-term emergency measure. If rains lift reservoirs from their emergency levels, Aragon warns it will halt supplies. But Mr Montilla tweaked Catalona's definition of "emergency" so it didn't rely solely on reservoir levels. Then Spain's Deputy Prime Minister, Maria Teresa Fernandez de la Vega, ordered Aragon to keep the water flowing "because conditions aren't sufficient to guarantee Barcelona's water supplies".

Water is now Catalans' principle worry: 43 per cent considered shortage the country's main problem. Authorities promise the crisis will ease when a huge desalination plant comes on stream next year. But they say little about how to tackle the long-term problem of water shortage afflicting the whole Mediterranean region. Catalan winemakers recognise that the change is permanent; some are planting new vineyards further north as traditional terrain becomes hotter and dryer.

Other entrepreneurs, including swimming pool manufacturers, have less room for manoeuvre. "The authorities are criminalising us," complained Josep Sadurni, of Catalonia's association of swimming pool manufacturers, which predicts losses of up to €200m (£160m) this year. "Who'll buy a pool if they can't fill it?" Mr Sadurni asked.

A striking image of the seriousness of the drought is provided by the emergence of a church from the waters of a drying reservoir. For 40 years, all you could see of the drowned village of Sant Roma was the belltower of its stone church, which peeped from time to time above the surface of the artificial lake in a valley flooded in the 1960s to supply Catalonia with water. This year falling water levels have revealed the 11th-century church in its entirety for the first time, attracting curious onlookers who walk round it on the reservoir's dusty bed. Spain's Socialist government recognises that climate change will intensify water shortages, and favours desalination plants. One such plant, among the biggest in Europe – and 75 per cent EU funded – is being built on the outskirts of Barcelona and will supply 20 per cent of the city's water. But it will not be ready until next year.

"It was already very important when it was planned, but now with the urgent drought, it has become indispensable," said Tomas Azurra, the chief engineer at the plant.

Ecologists warn that desalination plants are costly in energy use, and damage the environment with high CO2 emissions. But developed European regions can afford them, and they're preferable to diverting water from rivers, which critics say is even more damaging.

More than 70 per cent of Spain's water goes on agriculture, much of it wasted on antiquated irrigation systems and the cultivation of thirsty crops unsuitable for arid lands. But few politicians seek confrontation with farmers already struggling to scratch a living.

High-density tourist resorts sprinkled with swimming pools, patio showers and golf courses along Spain's desertified southern coast, especially in Murcia where it rarely rains, are also unsustainable, ecologists say.

Spain needs to capture more rainwater, says Stephanie Blencker of the Stockholm International Water Institute, as climate change will produce alternating extremes of drought and heavy rain. "Rain is the biggest resource we have, and we can make it available all year round if we have sensible storage opportunities," she said.

Since the 1992 Olympics, Barcelona has enjoyed the reputation of being both cutting edge and user friendly. But now, as climate change overwhelms a crumbling infrastructure, proud, autonomous Catalonia has to seek help from outside.