It happened when two trains packed with commuters and students, travelling for unknown reasons in opposite directions on the same stretch of single-line track between Andria and Corato north of Bari, smashed into each other head on.

Most of the passengers in the first two coaches of each train didn't stand a chance.

President Sergio Mattarella and Premier Matteo Renzi were among those calling for light to be shed on how the accident could have happened.

Pope Francis said he was praying for the victims.

Amid suspicions of human error or a faulty signal, Transport Minister Graziamo Delrio said that a commission of inquiry would be set up.

Mattarella said that "full light must be shed on this inadmissible tragedy: responsibilities and possible shortcomings must be immediately and precisely ascertained".

The President voiced "deep pain" over the crash, saying "my first thought goes out to the many victims and their families, to whom I would like to express my sympathies and solidarity".

He also wished the injured a "speedy recovery".

Renzi, who rushed down from Milan to the crash scene, said on Facebook: "Tears and pain for these lives cut short and for their families.

"But also so much, so much anger.

"Italy is entitled to know the truth: we want light to be shed, on everything.

"This evening I will be in Puglia with the local authorities, the regional government, the civil protection department and the ministries concerned.

"We won't stop until we find out what happened," the Premier promised the victims' families.

"One of the trains shouldn't have been there," he said.

The crash may have been caused by a lack of automated systems, said Stefania Gnesi, a researcher at Italy's National Research Council (CNR).

Gnesi told ANSA that online information seemed to indicate that the stretch of track where the crash occurred is still regulated by an older "telephone block" system, by which the green light on the single track is given through telephone communication.

Gnesi said that according to Italian State Railways, 98 per cent of rail traffic is controlled by automatic systems of a "more or less refined" nature, and the telephone block system is used in the remaining percentage.

Meanwhile, Pope Francis  voiced his "keenly felt and warm participation in the grief that has hit so many families".

Francis assured the victims' families of "fervent prayers for the suffrage of those who tragically died" and invoked "from the Lord a prompt recovery for the injured".

ANSA