The high-speed train collided with a maintenance vehicle on the track on Friday, the national relief operations authority CNOS said.
A spokesman for CNOS said there were 212 passengers on board the Alfa Pendular train - the country's fastest.
The incident occurred at around 3.30pm local time in the central region near the town of Soure, around 180km north of Lisbon.
They said two medical helicopters, as well as more than 160 rescue personnel, including firefighters, were at the scene.
The Civil Protection Agency said there have been two fatalities while at least seven others have been seriously injured. Around thirty others have been less severely injured.
The town's mayor Mario Nunes said the two dead were working on the rail tracks when the crash took place.
The train driver was among seven people with serious injuries and was rushed to hospital, SIC Television reported.
A spokeswoman for the District Command of Relief Operations in Coimbra, near where the collision took place said emergency services, including firefighters, were at the scene.
She said more emergency services were on their way to the scene, where a field hospital was set up.
In a note shared on its official website, Portugal's President Marcelo Rebelo de Sousa said he "regrets the serious rail accident" and sent "heartfelt condolences" to the victims' relatives and friends.