Police Berlin
Heavily-armed police stand behind concrete security barriers and a police armoured vehicle near the Brandenburg Gate, Berlin, prior to a concert there on December 23 GettyImages

German police have released a 40-year-old Tunisian detained in connection with the investigation into the Berlin Christmas market truck attack that left 12 people dead.

Investigators earlier said they found the phone number of the man in the telephone of Anis Amri, the 24-year-old Tunisian allegedly responsible for the attack, who was shot dead by police in Milan on 23 December.

A spokeswoman for the German federal prosecutor's service said that police had believed that Amri may have sent the man a message and picture over a messaging service shortly before the attack.

"Further investigation has shown that the arrested person was not the possible contact person of Anis Amri and therefore he was released," Frauke Koehler, a spokesman for German federal prosecutors said on Thursday 20 December.

The man had been arrested on Wednesday in the Tempelhof district of the city, as the police investigation whether Amri had any accomplices in planning the attack and subsequently fleeing Berlin.

Earlier, German police said that an emergency braking system in the lorry halted the vehicle during the attack, probably saving lives.

Amri's fingerprints and wallet were found in the truck, and Islamic State released a video after the attack showing him pledging allegiance to the group's leader, Abu Bakr al-Baghdadi.