VIENNA (AP) — Five years after a terror attack killed 12 people at a Berlin Christmas market, Germany’s president acknowledged Sunday that the government had not lived up to its duty to protect its citizens that day.

“We have to admit that the state has not been able to keep its promises of protection, security and freedom,” German President Frank-Walter Steinmeier said, adding that the years since the attack have shown that mistakes were made by German officials.

Steinmeier’s comments came at a Sunday evening commemoration of the fifth anniversary of the terror attack on Berlin’s Breitscheidplatz.

On Dec. 19, 2016, an Islamist terrorist plowed through a crowd of Christmas market-goers in a large truck, killing 12 people and injuring dozens more in the German capital. The attacker was killed days later in a shootout in Italy.

The attack “left a deep rift… in all our hearts,” Steinmeier said, adding that it “was aimed at our way of life: In peace, in freedom and democracy.”

In the years since the attack, the German government has faced criticism for its handling of Anis Amri, a rejected asylum-seeker from Tunisia who carried out the attack. An inquiry found in 2017 that Amri could have been detained and possibly deported months before the attack.

Going forward, Steinmeier said the Germany “has a duty to correct the mistakes, failures and problems that kept this attack from being prevented.”