The telegram was sent July 25, the feast of St. James the Apostle, patron saint of Spain. The accident occurred the previous day when the train, traveling above the speed limit, derailed.
Pope Francis' telegram to Archbishop Julian Barrio of Santiago de Compostela said he was praying for the victims, and he expressed his spiritual closeness to those suffering.
In Washington, the White House said at least six Americans were among those missing or injured.
Among those still missing as of July 25 was Ana-Maria Cordoba, a benefits specialist for Virginia's Arlington Diocese. She was traveling with her husband, Philippe, and daughter, Christina, a rising senior at Bishop O'Connell High School in Arlington.
Philippe and Christina Cordoba were listed in stable condition at the local hospital.
The Cordobas' son, Santiago, who had just completed a pilgrimage to Santiago de Compostela, and the three family members were en route to meet him.
They are members of St. Mary of Sorrows Parish in Fairfax, Va.