At least 77 people have been killed after a passenger train derailed in the northern Spanish region of Galicia on Wednesday evening, said a spokeswoman for Galicia's Supreme Court.

Seventy-three people died at the accident site and four died in hospital, the spokeswoman said on Thursday morning, adding that the numbers were still provisional. Judges in Spain are responsible for recording the deaths

Alberto Nunez Feijoo, president of the region of Galicia, calls the crash Spain's "worst rail accident in decades."

State-owned train operator Renfe said in a statement that 218 passengers and an unspecified number of staff were on board at the time of the accident.

Feast day festivities planned in the city of Santiago de Compostela were cancelled, town hall spokeswoman Maria Pardo told Spanish National television TVE.

State-owned train operator Renfe said in a statement that 218 passengers and an unspecified number of staff were on board at the time of the accident. (Oscar Corral/Reuters)

A photographer at the scene said he saw dozens of what appeared to be dead bodies being extracted from the wreck by emergency workers. Spanish National TV showed footage of what appeared to be several bodies covered by blankets alongside the tracks next to the damaged train wagons.

The photographer, Xabier Martinez, told The Associated Press that he also spoke to two injured train passengers who said they felt a strong vibration before the derailing.

The accident occurred on high-speed tracks near the train station in Santiago de Compostola, 95 kilometres south of El Ferrol. Rescue workers were seen in television images caring for people still inside some of the train cars.

The train, which belongs to the state-owned Renfe company, was headed to El Ferrol from Madrid.

Officials at the Interior Ministry and the Adif rail infrastructure authority did not immediately answer telephone calls or return messages seeking comment.

A government spokesperson said Prime Minister Mariano Rajoy was due to visit the site of the derailment, on the outskirts of the city of Santiago de Compostela on Thursday morning.

Officials with the train company also did not immediately return messages seeking comment.