A train carriage has derailed in Spain after part of a track became flooded between the southern cities of Malaga and Seville on Wednesday, leaving more than two dozen people injured.

Marian Alonso, spokeswoman for Spain’s Adif railway infrastructure company, said the last of three coaches came off the track near the town of Arahal after water from a nearby stream rose suddenly and lifted the track’s concrete sleepers.

She said 70 people were travelling on the train when the derailment occurred shortly after 10am.

A train carriage is seen derailed near the town of Arahal in Spain
A train carriage is seen derailed near the town of Arahal in Spain (Toni Rodriguez/AP)

The Andalusian regional health department said two people were seriously injured and flown by helicopter to a hospital in Seville. It said 25 other passengers were treated at the site for minor injuries.

Ms Adif said traffic on the rail route had been disrupted and alternative transport services were being supplied.

The company said heavy rains had caused problems on other areas of the track earlier in the day.

Heavy rains have hit many parts of Spain this week, ending a dry spell of several months.

The country has suffered drought conditions for some five years, leaving the country’s reservoirs at below 50% of capacity.