Police missed multiple chances to arrest the Berlin attacker before he carried out his massacre and may have attempted to a cover-up to disguise their failings, it has emerged.

Anis Amri killed 12 people in a rampage at a Christmas market in the German capital after pledging allegiance to Isis, managing to evade authorities for four days in five countries before being shot dead by police in Milan.

German authorities swiftly turned the blame on Tunisian authorities for hampering Amri’s deportation, but it has since been revealed that they had numerous chances to detain the jihadi for either terrorism or a range of serious crimes.

Andreas Geisel, Berlin's state interior minister, said a newly surfaced document from showed the Tunisian was known for large-scale drug dealing.

“In the view of experts, this information would have been sufficient to secure an arrest warrant from prosecutors,” he added.

“To put it plainly, on this basis of an arrest it might have been possible to prevent this attack.”

The file, detailing evidence from telephone taps and surveillance by Berlin’s state criminal police office (LKA), dated back to 1 November – seven weeks before Amri launched his attack.

Video surfaces of Berlin attack suspect Anis Amri

Mr Geisel said authorities were examining a possible cover-up that allegedly saw LKA officers deliberately withhold or even tamper with information exposing their failings following the massacre.

The state government has filed a criminal complaint against unnamed officers suspected of the obstruction of justice.

"We owe this to the victims, the relatives and the survivors,“ Mr Geisel told Berlin’s parliament on Thursday.

"We cannot have any interest in concealing anything. If there are weaknesses, then you have to name them."

A second LKA document was created on 17 January but apparently backdated to 1 November, mentioning drug dealing on only a small scale.

The new information was unearthed in an investigation by Bruno Jost, a former federal prosecutor appointed to examine possible errors by authorities in the case.

Investigations by German newspapers have revealed authorities had multiple chances to detain Amri, who managed to slip through gaps created by the country’s federal policing structures.

Berlin Christmas market lorry attack Show all 18 1 /18 Berlin Christmas market lorry attack Berlin Christmas market lorry attack Several people have been killed after a lorry drove into crowds at a Christmas market in Berlin REUTERS/Fabrizio Bensch Berlin Christmas market lorry attack 'At least nine' people have been killed and more than 50 injured. AP Berlin Christmas market lorry attack Emergency Services rush a Berlin market victim to an ambulance Associated Press Berlin Christmas market lorry attack Police cordoned off the square at Kaiser Wilhelm Memorial Church following the incident REUTERS Berlin Christmas market lorry attack Rescue workers inspect the lorry that crashed into a Christmas market close to the Kaiser Wilhelm memorial church in Berlin EPA Berlin Christmas market lorry attack Emergency crews inspect the lorry that ploughed into a Berlin Christmas market, killing at least nine people AFP Berlin Christmas market lorry attack Fire crews attend the scene of the attack AFP/Getty Berlin Christmas market lorry attack Armed police secure the site of a lorry attack at a Christmas market in Berlin REUTERS Berlin Christmas market lorry attack Crushed debris is visible beneath the wheels of the vehicle REUTERS Berlin Christmas market lorry attack An injured man is pushed to an ambulance REUTERS Berlin Christmas market lorry attack Medics attend an injured person after the lorry attack which killed at least nine and injured more than 50 people AFP/Getty Berlin Christmas market lorry attack Firefighters examine the lorry which was rammed into a Berlin Christmas market REUTERS Berlin Christmas market lorry attack A person is carried into an ambulance REUTERS Berlin Christmas market lorry attack View of the lorry that crashed into a Christmas market in Berlin, killing at least nine and injuring at least 50 people AFP/Getty Berlin Christmas market lorry attack Rescue workers push a person on a stretcher to an ambulance Getty Berlin Christmas market lorry attack Firefighters assess the damage after the lorry rammed the Christmas market, killing 'at least nine', and injuring more than 50 people AP Berlin Christmas market lorry attack Firefighters stand beside a toppled Christmas tree at the site of the suspected terrorist attack in a Berlin Christmas market AP Berlin Christmas market lorry attack Damaged stalls at the scene of the incident at a Berlin Christmas market where at least nine people have been killed EPA

Federal prosecutors apparently believed there was insufficient evidence to bring Amri in on terror charges, but he could also have been detained for offences including drug dealing, welfare fraud, assault and providing false identities.

When the 24-year-old arrived in the country as an asylum seeker in July 2015, he was already wanted at home in Tunisia after being sentenced to five years in prison for aggravated robbery.

​Amri fled during the 2011 Arab Spring on a smugglers’ boat to Italy, where he lied to police about his age and gained temporary protection as an unaccompanied minor.

Known for smoking and drinking, there were early hints at radicalisation when Amri ripped down Christian crosses from walls and once installed a black flag that has since become the symbol of Isis as a desktop wallpaper.

After a dispute with social workers, he later set a bed on fire and was jailed for four years – a period where his family believe his radicalisation intensified between bouts of violence with prisoners and guards.

Italy attempted to deport him at the end of his sentence in 2015 but in a scenario that would repeat itself a year later in Germany, Tunisia failed to respond to requests for identity documents and Amri was feed after the maximum time in custody allowed under Italian law.

Weeks later, he arrived in Germany, where Italy’s failure to enter the Tunisian’s fingerprints into an EU database meant the country’s authorities were not immediately alerted to his criminal past.

He started moving swiftly around the country using at least 14 aliases, multiple nationalities and fake documents, raising the alarm within months but frustrating investigations as he hopped between separate jurisdictions in Berlin and North Rhine-Westphalia.

Walid Amri poses with a portrait of his brother of Anis outside the family house in the town of Oueslatia, Tunisia (AFP)

Amri was flagged as a potential terrorist at a meeting of the Joint Counterterrorism Center in February 2016, having spoken about carrying out an Islamist shooting attack within earshot of an informant, Die Zeit reported.

Amri had joined a now-banned group of Salafists headed by an Isis recruiter known as Abu Walaa in the town of Hildesheim, but the Federal Criminal Police Office (BKA) concluded that there was no imminent danger.

The day after the meeting Amri was arrested by police in Berlin who confiscated his phone as he arrived on a bus from Dortmund – a move that apparently alerted to him to surveillance, causing intensified efforts to throw police off the scent.

Assessment of Amri’s phone showed he had been communicating with Isis fighters in the group’s Libyan stronghold of Sirte using an encrypted app, discussing his intention to marry a jihadi bride and commit a suicide attack.

In March 2016, Berlin prosecutors launched another investigation into Amri following a tip from federal security agencies, who warned that he might be planning a break-in to finance the purchase of machine guns for an atrocity.

The ensuing surveillance operation exposed Amri’s drug dealings and a bar fight, but no evidence was found to substantiate the original warning.

Terror suspect Ahmad Abdulaziz Abdullah A, known as ‘Abu Walaa’, in an online sermon (YouTube)

Germany formally rejected his asylum application in June but was unable to deport him because, again, Tunisia did not provide the necessary proof of his nationality.

The most violent incident came the following month, when Amri stormed a cocktail bar in Berlin, hitting a man in the face with a hammer as an associate stabbed another with a kebab knife in a turf war over drug dealing.

Amri was found to be a large-scale dealer working primarily out of the Kleiner Tiergarten and police requested an arrest warrant, but a public prosecutor unaware of his history and terror links declined after witnesses refused to testify.

As well as the violence, German authorities failed to act on mounting evidence of his radicalisation – frequently seen hand-in-hand with criminality among Isis militants including the Paris and Brussels attackers.

They ignored repeated warnings from Moroccan intelligence services, who contacted their counterparts four times detailing Amri’s links with Isis-linked jihadis and attack plans, even naming his roommates and giving his phone number as recently as October.

Investigators have since revealed that he recorded a video pledging allegiance to Isis in that same month, when he removed himself from the drugs scene and stopped watching an extensive porn collection on his phone – all indications he was preparing for “martyrdom”.

But still he was not arrested, leaving him free to shoot a Polish lorry driver in the head and steal his vehicle on 19 December, ploughing it into the Breitschiedplatz Christmas market in Germany’s deadliest Isis attack.