SANTIAGO DE COMPOSTELA, Spain - The driver of a train that hurtled off the rails killing 78 people in Spain faced possible charges as doctors worked on Saturday to identify the last three victims of the country's worst rail disaster in decades.

As Spain mourned, the city of Santiago de Compostela where the crash struck prepared a memorial service for the victims Monday in its cathedral, a destination for Catholic pilgrims from around the world.

Police have accused the driver, identified by media as Francisco Jose Garzon Amo, 52, of "recklessness" in Wednesday night's devastating crash. They said late Friday that he refused to answer their questions in his hospital bed and the case has been passed to the courts. The train was said to have been travelling at more than twice the speed limit on a curve when it hurtled off the rails and slammed into a concrete wall, with one carriage leaping up onto a siding.

Smoke billowed from the gutted cars as bodies were strewn across the tracks about four kilometres (2.5 miles) from the station at Santiago de Compostela. Locals said they came running from their houses to drag passengers from the wreckage.

The grey-haired driver, who reportedly boasted of his love for speed online, was under police surveillance in hospital, said Jaime Iglesias, police chief in the northwestern Galicia region.

The driver faces criminal accusations including "recklessness" but has not yet been charged, Iglesias told a news conference.

A police spokesman later told AFP that the driver had refused to respond to police questioning on Friday and the courts would now decide on judicial action.

Spanish media published photographs of the man they identified as Garzon after the crash, with blood covering the right side of his face.

The driver is not expected to appear in court on Saturday and no date has been set for his appearance before a judge, Galicia's High Court which is leading the investigation said in a statement.

The driver should have started slowing the train before reaching a bend that train drivers had been told to respect, the president of Spanish rail network administrator ADIF said.

"Four kilometres before the accident happened he already had warnings that he had to begin slowing his speed," Gonzalo Ferre told Spanish public television TVE.

Seventy-eight passengers perished, three of whom have yet to be identified, and 178 were injured, regional authorities said.

At least seven foreigners are among the dead - a US citizen, an Algerian, a Mexican, a Brazilian, a Venezuelan, an Italian and a national of the Dominican Republic, a judicial source said.

Most of the injured are Spanish but at least eight were foreigners from Argentina, Britain, Colombia, the United States and Peru.

Eighty-one people remained in hospital, including 28 adults and three children who were in critical condition.

The driver, while still trapped in his cab, told railway officials by radio that the train had taken the curve at 190 kilometres (118 miles) an hour, more than double the 80 kph speed limit on that section of track, El Pais said, citing unidentified sources in the investigation.

"I was going at 190! I hope no one died because it will weigh on my conscience," he was quoted as saying.

State railway company Renfe said the driver had been with the firm for 30 years, including 13 years as a driver.

He had driven trains past the spot of the accident 60 times during his time with Renfe, the president of the company, Julio Gomez-Pomar, told private television Antena 3.

"That is to say, the knowledge that he has to have of this track is exhaustive," he said.

Media reports described Garzon Amo, one of two drivers on the train, as a speed freak who once posted a picture on his Facebook page of a train speedometer at 200 kph.

A caption read: "I am on the edge, I can't go faster or else I will be fined."

The Facebook page has since been taken down.

Renfe said the train - a model able to adapt between high-speed and normal tracks - had no technical problems and had just passed an inspection on the morning of the accident.

Experts have raised questions about the track's speed signalling system.

Since high-speed trains use the route, it has been equipped with an automatic speed control system known as the European Rail Traffic Management System, under which a train's brakes can be automatically applied if speeding.

But the secretary general of Spain's train drivers' union, Juan Jesus Garcia Fraile, told public radio that the system was not in place at the crash site.

It was Spain's deadliest rail accident since 1944 when hundreds were killed in a train collision, also between Madrid and Galicia. In 1972, 77 people died when a train derailed between Cadiz and Seville.

Many of the passengers in Wednesday's crash were said to be on their way to a festival in honour of Saint James, the apostle who gave his name to Santiago de Compostela. Crowds of pilgrims travel to the town all year round to venerate him.