The Portuguese driver was among the dead in the accident, which saw the train hit the wall of a bridge and smash into a pillar, according to the mayor of the nearby town of O Porrino.
Pictures posted online and in local media showed one carriage of the train, which was carrying at least 65 people, lying on its side, the front completely caved in and mangled.
Helicopters, ambulances and fire engines rushed to the scene to attend to the victims, some of whom were thought to be seriously injured.
A passenger said in a video posted on local daily La Voz de Galicia that the train suddenly started wobbling.
“It wouldn’t stop. I was sitting down and I fell to the ground,” she said.
“And then the train stopped. It was that quick.”
Ramon Gonzalez, a witness interviewed by Spanish television who works in the station cafeteria near the accident, said there was a “very strong bang.”
“It was full of black smoke … It’s a straight line, the train was due to stop in 50 metres (164 feet), so this isn’t normal.
“There are still some injured here but not very serious, the seriously injured were quickly evacuated.”
– ‘Very straight line’ –
The train was travelling from the Galician town of Vigo to the city of Porto in Portugal when the accident happened near O Porrino.
Manuel Carrera, deputy mayor of O Porrino, said four people had died in the accident.
Adif, the company that manages railways in Spain and is in charge of the tracks, said the accident happened around 9.30am local time (0730 GMT) just before arriving into the station.
“It’s a very straight line,” a spokeswoman said.
“There isn’t bad visibility there, it emerges from a curb,” Eva Garcia de la Torre, Mayor of O Porrino, told the Cadena Ser radio.
She added that the train looked old.
But the reason of the derailment has yet to be determined.
Spain’s railway company Renfe said the train and the driver were both Portuguese, adding that railway traffic had been suspended in the area.
Galicia was also the scene of one of Spain’s worst rail disasters in 2013, when around 80 people were killed and another 144 injured after a train slammed into a concrete wall on the outskirts of Santiago de Compostela.
The train was approaching a curve at more than twice the speed limit on that piece of the track in Galicia.
A pre-trial investigation of the July 24, 2013 crash carried out by a court in Galicia concluded the accident was caused by a lapse in attention by the driver, who was on the telephone at the time of the crash with another rail employee.
He has been charged with negligent homicide, and a Spanish court said earlier this year that an investigation into the crash would be reopened to determine if Adif was also partly responsible.
As regional elections near in Galicia at the end of the month, several political parties including the ruling conservative Popular Party and the Socialists announced they had suspended their campaign, which had only just kicked off.
Meanwhile Acting Prime Minister Mariano Rajoy, who is from Galicia, tweeted his concern.
“My condolences to the families of those who died and hoping that the injured recover quickly,” he said.