(CNN) —  

At least three people were killed and dozens injured Thursday when a train derailed and crashed near the Italian city of Milan, the Italian fire department said.

The train derailed at 7 a.m. (1 a.m. ET) in Pioltello on the northeastern outskirts of Milan as it was traveling from Cremona, southeast of Milan, to the Porta Garibaldi railway station in the city’s center.

Rescuers help a woman out of the derailed train Thursday in Pioltello, Italy, outside Milan.
Rescuers help a woman out of the derailed train Thursday in Pioltello, Italy, outside Milan.
PHOTO: Flavio Lo Scalzo/ANSA via AP

At least eight people remain in critical condition after the crash, the fire department said.

The train’s operator, Trenord, said in a tweet that a “technical problem” caused the accident.

“Our thoughts go out to the victims and the families of the victims; we express our closeness to the injured and all the people that were aboard the train,” said Trenord CEO Cinzia Farisè, who has visited the scene of the crash.

All passengers who were trapped in the derailment have been accounted for, the Red Cross says.
All passengers who were trapped in the derailment have been accounted for, the Red Cross says.
PHOTO: Flavio Loscalzo/ANSA via AP

In photos, three carriages are sprawled across the tracks, one of them tilted to the side, smashed into a pole.

They also show a team pulling a passenger from a tilted carriage and trying to get to more people with ladders propped up against the windows.

All passengers were now accounted for, the Red Cross in Italy said.

Rescuers inside one of the train carriages try to help a passenger Thursday.
Rescuers inside one of the train carriages try to help a passenger Thursday.
PHOTO: Italian Firefighters Vigili del Fuoco via AP

Rete Ferroviaria Italiana, the company responsible for the country’s rail infrastructure, said it was investigating the cause of the accident.

CNN’s Hilary McGann and Angela Dewan contributed to this report.