German prosecutors say a man arrested after the truck attack on a Berlin Christmas market has been released because there is insufficient evidence to tie him to the rampage.

Federal prosecutors said the man, a Pakistani citizen who came to Germany last year as an asylum-seeker, denied involvement in the attack that killed 12 people and injured nearly 50 others.

They noted that witnesses were able to follow the truck's driver from the scene but lost track of him. The man arrested matched witness descriptions of the truck driver, but investigators have not been able to prove he was in the truck's cab at the time of the attack.

Under German law, prosecutors have until the end of the calendar day following an arrest to seek a formal arrest warrant keeping a suspect in custody.

German authorities are calling the attack an "act of terrorism" that had all the hallmarks of Islamic extremism.

Prosecutors said the man had denied any involvement in the attack. They also said no forensic evidence had been found proving that he was in the cab during the rampage.

Federal Criminal Police Office chief Holger Muench and other officials had expressed doubt earlier that the man in custody was the truck's driver.

Mr Muench also said police have not yet found a pistol they believe was used to kill a Polish truck driver who was supposed to be delivering steel beams with the truck used in the attack until it went missing.

Berlin police, meanwhile, urged people to remain "particularly vigilant" and to report "suspicious movements" to a special hotline.

"We may still have a dangerous criminal out there," Berlin police chief Klaus Kandt said.

Germany's top prosecutor, Peter Frank, told reporters the attack on the market outside the landmark Kaiser Wilhelm Memorial Church was reminiscent of July's deadly truck attack in Nice and appeared to follow instructions published by the Islamic State group.

"There is also the prominent and symbolic target of a Christmas market, and the modus operandi that mirrors at least past calls by jihadi terror organisations," Mr Frank said.

But he said authorities had not yet heard any claim of responsibility.

Germany's Chancellor Angela Merkel insisted the attack cannot change Germans' way of life.

"Twelve people who were still among us yesterday, who were looking forward to Christmas, who had plans for the holidays, aren't among us anymore," she said in an emotional, nationally televised statement before heading to the scene of the attack in downtown Berlin.

"A gruesome and ultimately incomprehensible act has robbed them of their lives."

Later, Mrs Merkel and German President Joachim Gauck attended a memorial service at the Kaiser Wilhelm Memorial Church and laid white roses outside the church.

Witnesses saw only one man flee from the truck after it rammed into the crowded Christmas market on Monday evening. It smashed through the market, going 60 to 80 metres before finally coming to a halt.

Six of those killed have been identified as Germans, and the man found shot and killed in the truck's passenger seat was Polish. The other five people killed have not yet been identified, and 18 people are still suffering from serious injuries.

Mrs Merkel, who has been criticised for allowing in huge numbers of migrants last year, addressed head-on the possibility that an asylum-seeker was responsible for the carnage.

"I know that it would be particularly hard for us all to bear if it were confirmed that a person committed this act who asked for protection and asylum in Germany," she said.

"This would be particularly sickening for the many, many Germans who work to help refugees every day and for the many people who really need our help and are making an effort to integrate in our country."

A spokesman for Berlin's office for refugee affairs said police conducted a broad search overnight at a large shelter for asylum-seekers at the city's now-defunct Tempelhof airport. Four men in their late 20s were questioned but nobody was arrested.

The Polish owner of the truck said he feared the vehicle may have been hijacked. Ariel Zurawski said he last spoke with the driver, his cousin, at around noon on Monday and the driver told him he was in Berlin and scheduled to unload on Tuesday morning.

"They must have done something to my driver," he told broadcaster TVN24.

Germans have been increasingly wary since two attacks by asylum-seekers in the summer that were claimed by the Islamic State group. Five people were wounded in an axe rampage on a train near Wuerzburg and 15 wounded in a bombing outside a bar in Ansbach, both in the southern state of Bavaria. Both attackers were killed.

Those attacks, and two others unrelated to Islamic extremism in the same week-long period, contributed to tensions in Germany over the arrival last year of 890,000 migrants.

Far-right groups and a nationalist party seized on Monday night's attack, blaming Mrs Merkel for what happened.

"Under the cloak of helping people Merkel has completely surrendered our domestic security," Frauke Petry, the co-chairwoman of the Alternative for Germany party, wrote.

Manfred Weber, a member of Mrs Merkel's conservative bloc and leader of the European Parliament's biggest political group, cautioned against sweeping verdicts but said it was important to ensure that extremists did not enter the country.

The German government said Mrs Merkel spoke on Tuesday with US President Barack Obama, who expressed his condolences. In Washington, White House National Security Council spokesman Ned Price said the United States was ready to help in the investigation and response.

US President-elect Donald Trump said Islamic extremists must be "eradicated from the face of the earth" and pledged to carry out that mission with all "freedom-loving partners".

The attack came less than a month after the US State Department warned that extremist groups including Islamic State and al Qaida were focusing "on the upcoming holiday season and associated events" in Europe.

The Islamic State group and al Qaida have both called on followers to use trucks in particular to attack crowds. On July 14, a truck ploughed into Bastille Day revellers in the southern French city of Nice, killing 86 people. IS claimed responsibility for the attack, which was carried out by a Tunisian living in France.