Through the darkness, passenger Stephen Ward saw a little circle of light -- the door of the train.
Rescuers came through it and helped the 18-year-old from Bountiful, Utah, get out.
He waited for hours while victims with more serious injuries were taken to the hospital. As he watched rescue crews carry the dead and wounded, he cried and sang church hymns to calm himself down.
A photo taken at the scene shows him leaning on a police officer as he walked beside the tracks, with blood oozing down his face and splattered on his crisp, white shirt.
The Mormon missionary walked past dead bodies on the ground. He told London's Daily Telegraph that it looked like a scene from hell.
U.S. citizen among those killed
When the train crashed, Ana-Maria Cordoba was on the way with her husband and their daughter to visit her son, who had been on a pilgrimage in Spain, the Catholic Diocese of Arlington told CNN.
Cordoba, who worked for the diocese, was killed, spokesman Michael Donahue said.
Her husband and daughter are hospitalized in stable condition, the diocese said.
Investigators are looking at all possible causes of the crash, a senior aide to the prime minister said Wednesday.
Renfe's spokesman said he did not know how many crew members were aboard the train when it crashed. Normally, there would be at least five crew members on a train like that, he said.
Officials appealed for blood donations just after the crash but on Thursday said the short-term needs were met.
Herman Van Rompuy, president of the European Council, expressed condolences from the European Union.
Pope Francis, who is on a visit to Brazil for World Youth Day, sent a telegram to the bishop of Santiago de Compostela, Julian Barrio Barrio, offering his support and prayers for all those affected by the tragedy.