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

Federal prosecutors said Tuesday that 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 at the market late Monday, which was filled with tourists and locals.

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 weren't able to prove that he was in the truck's cab at the time of the attack.

The Brandenburg Gate in <a href="https://twitter.com/hashtag/Berlin?src=hash">#Berlin</a> tonight, displaying colours of the <a href="https://twitter.com/hashtag/German?src=hash">#German</a> flag in honour of those killed in Christmas market attack. <a href="https://twitter.com/hashtag/CBC?src=hash">#CBC</a> <a href="https://t.co/gFQQowd6EN">pic.twitter.com/gFQQowd6EN</a> —@mevansCBC

According to the SITE Intelligence Group, an organization that tracks extremists groups, Islamic State in Iraq and Syria (ISIS) has claimed responsibility for the attack via its Amaq news agency and has called the driver a "soldier of the Islamic State."

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.

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

The suspect in the truck attack on a Berlin Christmas market has been released. ISIS has claimed responsibility for the act 2:52

'Still a lot that we don't know'

In a statement widely broadcast on German television, German Chancellor Angela Merkel said she was "shocked, shaken and deeply saddened."

"There is still a lot that we don't know about this act with sufficient certainty," she said. "But we must, as things stand, assume it was a terrorist attack."

Merkel, who has been criticized for allowing in large numbers of migrants, addressed head-on the possibility that an asylum seeker was responsible.

Women mourn at the scene of the deadly truck attack. (Fabrizio Bensch/Reuters)

"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," Merkel 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."

Authorities arrested the man about two kilometres from the crash site on suspicion of having been at the wheel of the truck. Footage showed the suspect, his head covered in a white sheet, being pushed into a police car shortly after the attack. Berlin's Tagesspiegel newspaper reported that the man was known to police for minor crimes.

A spokesman for Berlin's Office for Refugee Affairs said police conducted a large-scale 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, Sascha Langenbach told The Associated Press.

Truck hijacked

Six of those killed have been identified as Germans, and one as Polish. The other five have not yet been identified, and 18 people are still suffering from serious injuries.

The Polish man — Lukasz Urban, a 37-year-old from the western village of Roznowo, near the border with Germany — was found dead in the truck.

Investigators believe the attacker hijacked the truck, which belongs to a Polish company, from Urban and shot him. Prime Minister Beata Szydlo of Poland called Urban "the first victim of this heinous act of violence."

Lukasz Wasik, manager of the Polish company, described Urban as a "good, quiet and honest person" devoted to his work and the vehicle he drove.

"I believe he would not give up the vehicle and would defend it to the end if attacked," Wasik told TVP, Poland's state broadcaster.

The truck, guarded by police, was driven through tourists and locals outside the Kaiser Wilhelm Memorial Church near Berlin's Zoo station. (Michele Tantussi/Getty Images)

Germany has not so far experienced any mass casualty attacks by Islamic extremists, but has been increasingly wary since two attacks by asylum seekers in the summer that were claimed by the Islamic State in Iraq and Syria (ISIS).

Five people were wounded in an axe rampage on a train near Wuerzburg and 15 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 weeklong period, contributed to tensions in Germany over the arrival last year of 890,000 migrants.

Far right blames Merkel

Far-right groups and a nationalist party seized on it, blaming Merkel for what had happened.

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

German parliament lower house president Norbert Lammert, Chancellor Angela Merkel and President Joachim Gauck, left to right, attend a commemoration service in Kaiser Wilhelm Memorial Church for the victims of Monday's attack. (Michael Kappeler/Reuters)

The German government said Merkel spoke Tuesday with U.S. 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.

U.S. 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."

Merkel said Monday's attack would not cause Germany to live in fear.

"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. "A gruesome and ultimately incomprehensible act has robbed them of their lives."