At least 21 people have died in a train collision in southern Spain and left dozens more injured, as authorities warned the death toll could increase, the BBC reports.

Carriages on a Madrid-bound train derailed and crossed over to the opposite tracks, colliding with an oncoming train in Adamuz, near the city of Cordoba.

Four hundred passengers and staff were onboard both trains, the rail networks said. At least 24 people were seriously injured in the collision, including four children, according to Andalusia's emergency services.

Spanish Transport Minister Oscar Puente described the incident as "extremely strange" as officials launched an investigation.

All the railway experts consulted by the government "are extremely baffled by the accident," Puente told reporters in Madrid.

Rail network operator Adif said the collision happened about ten minutes after the train left Malaga at 18:40 local time (17:40 GMT) heading to Madrid, after derailing on a straight stretch of track.

The force of the crash pushed the carriages of the second train into an embankment, Puente said, adding that most of those killed and injured were in the front carriages of the second train.

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

Iryo, a private rail company that operated the journey from Malaga, said around 300 passengers were on board the train that first derailed, while the other train—operated by the state-funded firm Renfe—had around 100 passengers.