The crash occurred around 11:30 a.m. on a single track running through an olive grove between the towns of Andria and Ruvo di Puglia. The closest major city is Bari, about 20 miles east of Ruvo di Puglia.
Prime Minister Matteo Renzi, who was attending the opening of a new science museum in Milan, announced that he would return immediately to Rome and ordered an investigation. He later visited the site of the crash, the news agency ANSA reported.
“We won’t stop until we clarify what happened,” he told reporters in Milan. “There is an absolute need to understand who is responsible and to shed total light” on what happened, he said.
Mr. Renzi sent the infrastructure and transportation minister, Graziano Delrio, and the head of the civil protection agency, Fabrizio Curcio, who oversees emergency response in Italy, to the site of the crash. “It’s an incident of enormous proportions,” Mr. Delrio said when he reached the scene on Tuesday afternoon, adding that the crash was “very violent.”
The circumstances that led to the collision were unclear. A team of inspectors from the transportation ministry will work with local prosecutors to determine the cause, officials said.
Teams of rescuers worked through the afternoon to separate the two trains, extricating victims and searching for survivors in the intense July heat. One exhausted policeman, who appeared barely able to walk, was escorted from the scene by another officer.
“It’s so horrible,” a woman who survived the crash told a local television channel, Telesveva, in an interview. “I don’t know how it happened, but in a second, my husband was suddenly two meters away from me.”
The woman, whom Telesveva did not identify, described seeing body parts strewn on the ground, and said she had had to step over them barefoot to get away from the crash after pulling her husband free of the wreckage. “I could do nothing for them,” she said.
The front cars of both trains were smashed, and both trains were at least partly derailed. Television images showed heavily damaged rail cars. At least one car was still on the tracks with its windows blown out; another was laying off to the side, twisted at an odd angle with its undercarriage facing upward.
News agencies also broadcast images of rescue officials taking away wounded passengers on stretchers. The jarring sound of cicadas could be heard as firefighters searched for survivors among the wreckage.
ANSA reported that emergency workers had extracted a young boy from the wreckage and taken him by helicopter to a hospital. With no access roads near the tracks, it was difficult for search-and-rescue teams to get vehicles through the olive grove to the crash site.
Local officials made an appeal for blood donations, and put the number of injured at 55, most in critical or serious condition.
Stefania Gnesi, an information technology staff researcher at the National Research Council, said in a telephone interview that there was no automatic brake system in use on the stretch of track where the crash occurred.
Ms. Gnesi said that the trains were probably operating on instructions from dispatchers. “It’s probable that there was some human error in this chain, in a section of train track that has no automatic control or automatic brake system,” she said.
Automatic systems are used on most of Italy’s railway lines, but have not yet been installed in some areas, especially in southern Italy, which is less developed and less prosperous than the north.
The line where the crash occurred links the cities of Andria and Bari on the Adriatic coast, and is used by about 10,000 passengers a day, according to Riccardo Amirante, a deputy dean at Politecnico University in Bari. There are two tracks along most of the 37-mile line, Mr. Amirante said in a phone interview, “but unfortunately not that stretch.” He said trains typically travel the line at around 90 kilometers an hour, or 56 m.p.h.
The accident appeared to be one of the most deadly rail disasters in Italy in seven years. In June 2009, a 14-car freight train carrying liquefied petroleum gas derailed and exploded in Viareggio, on the west coast of Italy in the Tuscany region. That disaster killed 32 people.
President Sergio Mattarella of Italy expressed “deep pain” over the crash, which he called an “unacceptable tragedy.” Mr. Mattarella said in a statement: “We need to ascertain immediately and precisely responsibilities and possible flaws.”