Spain’s transport minister submitted his resignation on Tuesday, following last week’s rail accident in which 69 people lost their lives. It was one of the worst rail accidents in Europe this century.

Oscar Puente, who had earlier vowed to work “tirelessly” to restore confidence in Spain’s high-speed rail network, the second-largest in the world, also announced that he would withdraw from the race in the country’s next general election, The Guardian reports.

Last week’s accident, together with another rail disaster earlier this year, has overshadowed the campaign for the November 29 election. In opinion polls, Socialist prime minister Pedro Sanchez is trailing his opponents.

Puente had ruled out resigning on several occasions since the accident.

However, at the end of a lengthy hearing before lawmakers, he said: “I would like to inform you that not only am I leaving the post of transport minister, but I am also withdrawing my candidacy from the lists for the early parliamentary elections on November 29.”

Earlier in the day, at a press conference where he presented measures to improve safety, the minister had said that the government would “work tirelessly to earn and restore public confidence in high-speed rail transport”.

The right-wing opposition, which had called for Puente’s resignation, as well as the unions, had criticized him for seeming to place all responsibility for the accident on an operator at the control center.

The accident occurred on Wednesday, outside the village of Urda, about 130 kilometers south of Madrid, when a train operated by state-owned Renfe crashed from behind into a stationary train belonging to the private Spanish company Iryo.

A fault in the automatic safety system had stopped all trains on a rail section of around 63 kilometers. However, the control center had authorized the Renfe train to continue its journey.

Among the measures Puente presented earlier at the press conference was the creation of computer software for control centers that would automatically issue alerts and make it easier to identify irregularities in rail traffic.

Puente said an artificial intelligence agent would also be created to monitor the system and “minimize the possibility of human error”, describing the proposal as unprecedented.

In cases where a control center operator makes a decision while the automatic safety system is out of service, a second operator would have to confirm it, Puente added.

The train drivers’ union Semaf, which has announced strikes at Renfe on November 10 and 12, has denounced deteriorating working conditions and the use of “degraded systems”.

Critics say investment in rail maintenance has not kept pace with the increase in passenger numbers since Spain’s rail network was liberalized in 2021. The process enabled private companies to enter the market, ending Renfe’s decades-long monopoly.

In what appeared to be an acceptance of the unions’ demands, Puente said the working conditions of control center operators would be reformed, including the length of breaks and monitoring their fatigue levels.

Puente also announced a 30-million-euro aid package for the families of the victims and the dozens of people injured in the accident.

Another rail collision in the southern region of Andalusia in January claimed 46 lives. This accident had also occurred on the same major line linking Madrid with the city of Seville, which was Spain’s first high-speed rail line, opened in 1992.