MADRID -- A passenger train derailed Wednesday night on a curvy stretch of track in northwestern Spain, killing at least 40 people caught inside toppled cars and injuring at least 140 in the country's worst rail accident in decades, officials said.
Bodies were covered in blankets next to the tracks and rescue workers tried to get trapped people out of the train's cars, with smoke billowing from some of the wreckage. Some passengers were pulled out of broken windows, and one man stood atop a carriage lying on its side, using a pickaxe to try to smash through a window. Images showed one car pointing up into the air with one of its ends twisted and disfigured, and another severed in two.
Officials gave differing death tolls in the immediate aftermath of the crash just outside Santiago de Compostela, on the eve of the city's annual religious festival that attracts tens of thousands of Christian pilgrims from around the world.
Alberto Nunez Feijoo, president of the region of Galicia where Santiago de Compostela is the capital, said at least 40 people died. But the president of Galicia's main court, Miguel Angel Cadenas, was quoted from the scene by the Cadena Ser radio station saying 56 died. Rescue workers were still searching through the smoldering wreckage of the train's cars Thursday morning in the pre-dawn darkness.
State-owned train operator Renfe said in a statement that 218 passengers and an unspecified number of staff were on board the eight-carriage train during the 8.41 p.m. (1841 GMT) crash on a section of tracks about 2.5 miles (4 kilometers) from Santiago de Compostela that came online two years ago .
Renfe and track operator Adif were cooperating with a judge who has been appointed to investigate the accident, Renfe said.
A regional Galicia health official, Rocio Mosquera, told reporters at a press conference early Thursday morning that more than 140 passengers from the train had been treated at area hospitals, with their conditions ranging from light injuries to serious and some still in surgery hours after the crash.
Officials in Santiago de Compostela canceled ceremonies planned for Thursday, when Catholic pilgrims converge on the city to celebrate a festival honoring St. James, the disciple of Jesus whose remains are said to rest in a shrine. The city is the main gathering point for the faithful who make it to the end of the El Camino de Santiago pilgrimage route that has drawn Christians since the Middle Ages.
The crash happened about an hour before sunset after the train emerged from a tunnel and derailed on the curve -- sending cars flying off the tracks. At least one caught fire in a scene that Feijoo said was "Dante-esque."
"The train travelled very fast and derailed and turned over on the bend in the track," passenger Sergio Prego told Cadena Ser. "It's a disaster. I've been very lucky because I'm one of the few be able to walk out."
Another passenger, Ricardo Montero, told the radio station that "when the train reached that bend it began to flip over, many times, with some carriages ending up on top of others, leaving many people trapped below. We had to get under the carriages to get out."
Xabier Martinez, a photographer who arrived at the scene as rescue workers were removing dozens of bodies, said two injured train passengers told him they felt a strong vibration just before the train's wagons jumped the tracks.
Officials said they believed the crash was an accident but declined to offer more details, saying an investigation was under way into the cause. There was no speculation by officials that it might be a possible act of terror, like the commuter train bombing attacks in Madrid in 2004 that killed 191 people.
The train, which belongs to the state-owned Renfe company, started from Madrid and was scheduled to end its journey at El Ferrol, about 95 kilometers (60 miles) north of Santiago de Compostela. Although it was not one of Spain's highest speed bullet trains called AVEs, it was a relatively luxurious version that uses the same kind of track as Spain's fastest expresses.
It was Spain's deadliest train accident since 1972, when an accident on a track heading to the southwestern city of Seville killed 77 people, the Europa Press news agency reported. A train traveling from Madrid to the Galicia region in 1944 crashed and killed 78 people. A subway crash in the southern city of Valencia killed 43 people in 2006 and was blamed on excessive speed.
King Juan Carlos and Prime Minister Mariano Rajoy both offered their condolences to the victims in Santiago de Compostela. Rajoy, who was born in the city, announced he would visit the crash site Thursday.