The Valencia underground train involved in a crash on Monday that killed 41 was travelling at twice the normal speed when it derailed, officials say.
Queen Sofia and King Juan Carlos attended a memorial service
It was doing 80km/h (50mph) at the spot where it came off the tracks, data from the train's black box shows.
On Tuesday, a five-minute silence was observed across Spain in memory of the people killed in the crash.
The prime minister and the royal family joined hundreds of people for a funeral service in Valencia's cathedral.
Officials say evidence from the black box, which was recovered from the wreckage by emergency workers, suggests the train was speeding on a curved part of the track, where the speed is limited to 40km/h (25mph).
Fernando Soto, the Secretary General of the Railway Union, told Spanish radio that the speed of the train was the main cause of the accident.
He suggested that something may have happened to the driver - perhaps a heart attack - to explain this unusual and excessive breach of the speed limit.
Valencia's authorities have discounted a tunnel collapse or a ruptured wheel as possible factors in the crash.
With the 2004 Islamist bomb attacks on Madrid's rail network still fresh in Spanish minds, the authorities ruled out any terror link to Monday's crash.
A funeral service for the 41 victims of the crash was held in the city at 1900 local time (1800 BST).
King Juan Carlos and Queen Sofia, along with Prime Minister Jose Luis Rodriguez Zapatero, joined hundreds of mourners, including families of the victims, for the Roman Catholic service.
It was led by the archbishop of Valencia, Agustín García-Gasco, who called on God to pardon sins and take the victims of the train crash to eternal life.
The accident comes days before Pope Benedict XVI is due to visit Valencia, with preparations being made for hundreds of thousands of pilgrims to use the city's public transport network.
Bereaved families filed through the morgue on Tuesday to identify the bodies, many of them clearly in a state of shock.
Only one of the bodies reportedly remained unidentified.
The dead include the mother of an 11-year-old girl who is among the injured, Valencia's sub-prefect Luis Felipe Martinez was quoted as saying by AFP news agency.
A bouquet of red and white carnations and burning candles could be seen outside the Jesus station.
The four-carriage train was travelling on Valencia's Number One underground route, close to a junction with another line.
It came off the rails between Plaza de Espana and Jesus stations and smashed into the walls of a tunnel near Jesus station in the eastern Spanish city.
The train had passed a safety inspection just one week before the crash, Spain's Efe news agency reports.
Unions say the train line where the accident happened is the oldest in Valencia's metro network.
Last September, three underground trains collided in Valencia on the same line, injuring 29 people.
Have you been affected by this incident? Send us your comments using the form below:
I was at Jesus Metro Station only 25 minutes before the Crash today. I have been travelling on this line every day for the past 3 years. Line "1" is the oldest on the network and some of the trains are really in a poor condition. In some of the stations you can actually see water leaks gushing from under the tracks.
Nick Cheesman, Valencia, Spain
Fist of all I want to give my condolences to the people who have suffered in this catastrophe. I am very sorry. I have travelled on that line and every time I felt terrified. Trains stopped for technical failures, lights went off, etc. The trains were very old and should have been removed many years ago.
Carmen, Valencia (Spain)
I have lived in Valencia for 24 years. Yesterday I was broken when I heard the news. That underground line is the one of the busiest ones, since is leading to Universities from the outskirts of Valencia.
Jose Campins, Valencia
Many have complained in the past about the lack of improvements and decent maintenance of this line, very much used by students, workers, tourists... while the city builds opera houses and yacht clubs. The "authorities" blame the "speed".
Miguel García, Madrid, Spain.
I usually travel on that line and people have long been saying that it is in very bad condition. In the place where the accident happened there is a bend that makes the train shake tremendously. It was only a matter of time. All Valencia's citizens are dismayed.
José Miguel, Valencia, Spain
I would like to offer my most heartfelt feelings to the people families and all who were caught up in this. To me there seems to be an investigation needed into the public transport and it's safety.
Simon Carney, Brighton UK
I still can't believe this has happened five minutes away from my home; it's the train station I use. I hope now they'll change old wagons and not only those which are in metro lines used by tourists.
Mireia Nicolas, Valencia - Spain
The BBC may edit your comments and not all emails will be published. Your comments may be published on any BBC media worldwide.