Recovery operations continued on Wednesday using a giant crane to remove the mangled carriages and debris of the two commuter trains that slammed into one another just before noon on Tuesday in southern Puglia.

The official death toll stood at 23, including a farmer working in his fields who was killed by flying debris. The prefect of Barletta, Clara Minerva, said relatives reported another four people unaccounted for and suggested that their remains could have been scattered within the wreckage, particularly in the area of highest impact.

"Some remains have been recovered, and on these DNA and other tests are under way," Ms Minerva said.

As a result Transport Minister Graziano Delrio put the provisional death toll at 27. Local officials said that of the 51 people originally hospitalised, 27 have been released. Seven of those still in hospital are in a critical condition.

Mr Delrio confirmed that the stretch of track between the towns of Andria and Corato did not have an automatic alert system that would engage if two trains were close by and on the same track. Rather, the system relied on station masters phoning one another to advise of a departing train.

The phone system "leaves an entirely human management and is among the least evolved and most risky ways of regulating railway circulation," Mr Delrio told parliament.

Under the system, he said, the station master can only allow the train to leave if it is confirmed that the line is free at the arrival station, allowing only one train at a time on the single railway.

He said the single rail track used in the area is not dangerous if "advanced technology is applied".

Andria mayor Nicola Giorgino said the crash was particularly tragic and "paradoxical" since work was to begin within a few months to build a second track on the route.

In fact, the work was supposed to have begun years ago, and EU funding was secured when it was first proposed for the 2007-2013 period.

According to the national investment and development agency Invitalia, the EU Regional Development Fund had approved 62% of the 180 million euro investment into the north Bari rail improvement that included a second track for the Corato-Andria line.

Mr Delrio did not explain why it was never built but noted that Puglia officials had secured funding for the 2014-2020 budget and that bidding for contracts was to have begun on July 19.

Trani prosecutor Francesco Giannella said the delay in the track-doubling work would be part of the investigation. "We will investigate on the delays of the work on the line and on the deficiencies in the security system," he said.

Many relatives of the victims have demanded justice, questioning how a single track could still be in use in 2016 and warning national authorities not to abandon them.

"We went around all the hospitals, all day," said Giuseppe Colaleone, the brother-in-law of a passenger. "In the end we came here. My brother said she (his missing wife) had a necklace with the letter M on it, and a scar here, signs that could identify her. A nurse said they have probably identified her."

The trains were operated by a private, Bari-based rail company, Ferrotramviaria, that connects the city of Bari with Puglia towns to the north and the airport. Ferrotramviaria's website said its fleet comprises 21 electric trains, most with four carriages each.

Mr Delrio stressed that the national government bore no responsibility for the incident, and that security for regional trains was up to the operator in charge, Ferrotramviaria.