An investigation into a jihadist truck rampage through a Berlin Christmas market pointed Thursday to a catalogue of “gross mistakes”by security services in the lead-up to the deadly attack.

The scathing report found that authorities had missed several opportunities to arrest and deport the driver, Tunisian asylum seeker Anis Amri, long before the attack that claimed 12 lives last December.

The 24-year-old, who had previously been jailed in Italy, had been in touch with radical Islamists and sold drugs in Berlin, had managed to escape detection by skipping across German state lines and using different identities.

“Gross mistakes were made that should never have happened,” said former prosecutor Bruno Jost in presenting the 72-page report.

Berlin police who had been tipped off that Amri was a potentially violent Islamist had conducted surveillance only on weekdays, taking off weekends and public holidays, he said.

And they dropped their observation altogether after the first few weeks, judging Amri to be just a small-time drug dealer.

Although Berlin police could have arrested Amri on drugs charges, he slipped through the net largely because of miscommunications with the prosecution service, he said.

And after the attack, police doctored their records to try and cover up their shortcomings, a revelation that is subject to a criminal investigation.

Six months before the carnage in Berlin, Amri had been arrested in the southern city of Friedrichshafen carrying two fake Italian passports.

But he was held for just two days, although authorities could plausibly have “taken him out of circulation for three or four months,” during which time he may have been expelled to Tunisia, Jost said.

Instead, Amri went on to stage the December 19 attack, murdering a Polish truck driver before he ploughing the vehicle into a crowd, killing 11 more people and wounding almost 100.

Amri, who had sworn allegiance to the Islamic State group, was shot dead days later by Italian police in Milan.