At least 39 people have died in a train collision in southern Spain and dozens more have been injured in the country's worst rail crash in more than a decade, Spain's Civil Guard has said.


Carriages on a Madrid-bound train derailed and crossed over to the opposite tracks, colliding with an oncoming train in Adamuz on Sunday evening.


Four hundred passengers and staff were onboard both trains, the rail networks said. Emergency services treated 122 people, with 43, including four children, still in hospital. Of those, 12 adults and one child are in intensive care.


Spanish Transport Minister Óscar Puente said the death toll is not yet final, as officials launched an investigation.


Puente described the incident as extremely strange. All the railway experts consulted by the government are extremely baffled by the accident, he told reporters in Madrid.


Rail network operator Adif said the collision happened at 19:45 local time (18:45 GMT), about an hour after the train left Málaga heading north to Madrid, when it derailed on a straight stretch of track near the city of Córdoba.


The force of the crash pushed the carriages of the second train into an embankment, Puente said. He added that most of those killed and injured were in the front carriages of the second train, which was travelling south from Madrid to Huelva.


The type of train involved in the crash was a Freccia 1000, which can reach top speeds of 400 km/h (250 mph), a spokesperson for the Italian rail company Ferrovie dello Stato told Reuters news agency.


Rescue teams said the twisted wreckage of the trains made it difficult to recover people trapped inside the carriages.


Córdoba fire chief Francisco Carmona told Spanish public broadcaster RTVE: We have even had to remove a dead person to be able to reach someone alive. It is hard, tricky work.


All rail services between Madrid and Andalusia were suspended following the accident and are expected to remain closed all day on Monday.


The official cause is not yet known. An investigation is not expected to determine what happened for at least a month, according to the transport minister.


Spain's Prime Minister, Pedro Sánchez, said the country will endure a night of deep pain. The emergency agency in the region of Andalusia urged any crash survivors to contact their families or post on social media that they are alive.