Hundreds of mourners gathered Monday at a memorial mass for the 79 people killed in Spain's worst train disaster in years held in the world pilgrimage city of Santiago de Compostela.
Members of the royal family and government joined grieving families and locals in the city's great yellow-stone cathedral as the bells sounded a slow funeral toll for those killed in Wednesday's crash.
The driver is accused of causing the crash. He was charged late on Sunday with 79 counts of reckless homicide and released under court supervision.
Mourners bowed their heads and wiped away tears as Julian Barrio, archbishop of the city in the northwestern region of Galicia, prayed for the dead, dressed in his blue robes and white mitre.
"Families who have lost your loved ones, from the first moment we have had you in our hearts, as have Galicia and Spain, and so many people beyond our borders who have asked me to pass on their condolences," he told the congregation.
"We commend our brothers to the mercy of God."
The heir to the Spanish crown Prince Felipe, his wife Princess Letizia and his eldest sister Elena, dressed all in black, sat solemnly before the high gold altar.
Also under the towering arches of the cathedral - one of the spiritual hearts of Roman Catholic Spain - sat Prime Minister Mariano Rajoy, a native of the city, government ministers and regional officials.
Emergency workers stood in their red and yellow vests as a choir sang mournful hymns and Barrio broke bread and held communion.
After the service ended members of the royal family went from row to row in the cathedral, clasping the hands of the bereaved or kissing them on the cheeks.
Locals and visitors including foreign pilgrims to the city stood to pay their respects outside the cathedral, at whose gates were placed flowers, candles and handwritten messages of condolence.
A crowd watched the service on a giant outdoor screen nearby.
"I have come because I am from Santiago and because there are people close to me who died in the crash and I know their families," said Mari Carmen Figueroa, 60, dressed in a black jacket and trousers, outside the cathedral.
"Even if I hadn't known them, I would have come."
Most of the dead were buried over the weekend in various parts of Spain.
Many aboard the train were Catholic pilgrims heading for Santiago de Compostela's internationally celebrated annual festival honouring St. James, a disciple of Jesus whose bones are said to rest in a crypt beneath the altar of the city's cathedral.
The mayor of the city called off all planned concerts and firework displays that had been due to be held on Thursday as part of the festivities.
The driver of the train, Francisco Jose Garzon Amo, 52, admitted to the judge that he had had a "lapse" of concentration while driving the train, Spanish media reported on Monday, citing court sources.
Garzon left court after a two-hour hearing Sunday by car for an unknown location. Press photographs showed him in handcuffs, a gash on his head from the accident and his eyes hidden behind sunglasses.
The judge ordered him to report to court once a week and banned him from leaving Spain for six months, while the court reviews the charges against him.
Regional health officials on Sunday said a US woman critically injured in the crash had died in hospital, bringing the toll to 79 including nine foreigners.
Reports suggested the train was travelling at more than double the speed limit when it flew off the tracks on a sharp bend and ploughed into a siding on the outskirts of Santiago.
El Pais newspaper, citing investigation sources, reported that Garzon had 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 for that section of track.
A court source said investigators would on Tuesday analyse data from the train's "black box" recorder, which is expected to tell them how fast the train was going and what action the driver took.
Cranes and trucks finished removing the wrecked train carriages from the track on the outskirts of the city and rail traffic resumed there early Monday at low speed.