A high-speed train derailed in the Portuguese district of Coimbra, killing two people and injuring at least 30 others.
The train traveled north from Lisbon to Braga, with regular stops in the cities of Coimbra and Porto.
However, around 3:30 p.m. (2:30 p.m. GMT), it crashed into a railway maintenance machine in the town of Soure.
President Marcelo Rebelo de Sousa said he had offered “his condolences to the families and friends of those killed” in this “serious accident”.
The country’s national relief operations authority, CNOS, told Reuters news agency emergency services were on the scene.
A spokesman said there were 163 rescuers, including firefighters, and two medical helicopters.
There were 240 passengers on the Alfa Pendular train, which is the fastest in Portugal, they said.
A witness told the Portuguese newspaper Diário de Noticias that there was panic inside the train at the time of the accident.
“I thought I was going to die,” they said. “The car took about 10 to 15 seconds to stop. People were screaming and lying on the ground. Then the car started to fill with dust.
“We were stuck inside the car because the doors had been destroyed. Someone managed to break one of them and we started to go out and help other people out.