Twenty-seven people have been injured, two of them seriously, after a train travelling between Málaga and Seville derailed near the town of Arahal, emergency services in Andalusia and the regional government confirmed on Wednesday morning.

Images posted by passengers on Twitter showed at least one carriage had derailed but not turned over. The images showed the track near the site of the accident in disrepair due to heavy rain and mud.

The train was covering the medium distance 13901 service between Málaga and Seville, Spanish rail operator Renfe confirmed.

Arahal, a town of 19,500 inhabitants, is approximately 40 km from Seville and 120 km from Málaga, the last stop before the town of Dos Hermanas when travelling towards Seville.

The First Minister of Andalusia, Susana Diaz, demanded an explanation from Spanish track operator Adif.

Both Spanish rail operator Renfe and Adif had announced the suspension of the service on that stretch of the line earlier in the morning—before the accident—due to bad weather.

At 8:20 a.m., Renfe announced on Twitter that the service between El Sorbito and Arahal had been suspended due to "strong rains". At 8:41 a.m., Adif announced the same suspension, on the same stretch of track, and also "because of adverse weather conditions".

At 9:34 a.m., Adif announced the service had been reestablished at 9:25 a.m.

Andalusian regional health authorities said they had received the first emergency call describing an accident at 10:13 a.m.

At 10:27 a.m., Adif announced the service had again been suspended, this time due to the accident, and also citing the bad weather as a cause.

Several emergency service crews and vehicles, including a helicopter, were deployed to the scene to rescue the survivors.