German police have detained a 26-year-old Tunisian man over links with the perpetrator of an Islamist truck attack on a Berlin Christmas market that killed 12 people, a federal prosecutors' spokeswoman said on Wednesday.

Police on Tuesday evening searched the living quarters of the man identified as Bilel A. after he was found to have had dinner with Anis Amri a day before Amri steered a truck through the market on Dec. 19, spokeswoman Frauke Koehler said.

"This contact person is a 26-year-old Tunisian. We are investigating him for possible participation in the attack," she told reporters.