Spanish Prime Minister Pedro Sanchez has promised to get to the bottom of why two high-speed trains collided in southern Spain, killing at least 40 people, as rescuers continue to search the wreckage.

After visiting the site of the crash, Sanchez also announced three days of national mourning for the victims.

More than 120 people were injured as carriages on a Madrid-bound train derailed and crossed over to the opposite tracks, colliding with an oncoming train in Adamuz on Sunday evening.

The crash is the worst the country has seen in more than a decade.

Rail network operator Adif stated that the collision occurred at 19:45 local time (18:45 GMT) on Sunday, about an hour after one of the trains left Málaga heading north to Madrid. It derailed on a straight stretch of track near the city of Córdoba.

The force of the crash pushed carriages of the second train into an embankment, with most of those killed and injured located in the front carriages of the train traveling south from Madrid to Huelva, according to Transport Minister Óscar Puente.

Rescue teams have faced obstacles due to the twisted wreckage, complicating recovery efforts for individuals trapped inside carriages.

Sanchez, who visited the crash site with senior officials, expressed deep sorrow, stating, This is a day of sorrow for all of Spain, for our entire country. He affirmed that the truth will be pursued and revealed transparently.

Investigations are anticipated to take at least a month, with Puente calling the circumstances extremely strange. Initial reports indicated a faulty joint on the rails as a potential contributing factor to the widening gap between rail sections.

Four hundred passengers and staff were on board the two trains. Emergency services treated 122 individuals, with 41, including children, remaining hospitalized, 12 of whom are in intensive care.

As a precaution, high-speed train services between Madrid and the southern cities of Malaga, Cordoba, Sevilla, and Huelva have been suspended until further notice.

King Felipe VI and Queen Letizia expressed their condolences, as the Spanish Red Cross has mobilized emergency services and provided counseling to affected families.

Spain’s high-speed rail system, the second largest in the world, connects over 50 cities across the country, covering more than 4,000 km of track.