Railway lines have been closed, a football match has been cancelled and people have been ordered to stay indoors after heavy rain in parts of Spain.
Weather warnings were issued for intense rainstorms in Madrid and nearby areas on Sunday.
Spain‘s national weather agency AEMET issued a maximum red alert, which meant extreme danger was possible in the Madrid region, Toledo province and city of Cadiz.
Rail services between Madrid and the eastern coastal area of Valencia and other lines were suspended.
Madrid’s mayor Jose Luis Martinez-Almeida urged people to stay off the streets to help emergency crews move more quickly.
Mr Almeida said he was expecting “an exceptional and truly rare situation in terms of precipitation”.
He said the city’s record rainfall of 87 litres per square metre in 1972 would “most likely be broken” with 120 litres per square metre forecast.
Residents have been sent text messages with instructions to stay at home and avoid using cars.
Atletico Madrid’s home game against Sevilla was postponed following warnings from the weather service and the regional government.
Local media reported on Saturday that police were investigating whether two people who died while canyoning in northern Spain drowned.
The intense rain comes after Spain endured a heatwave in August.
The country sweltered in its hottest day ever after a provisional heat record of 47.2C (116.96F) was set in the Andalusia region.
Spain’s State Meteorological Agency noted that 24 heatwaves have been recorded over the last decade, twice the number in each of the previous three decades.