Tens of thousands of Danes gathered at torch-lit memorials around the country, commemorating victims of deadly attacks on a synagogue and an event promoting free speech that shocked a nation proud of its record of safety and openness.

According to local media, some 30,000 people had gathered in Copenhagen to remember the victims.

Prime Minister Helle Thorning-Schmidt thanked the international community for the support they had voiced.

"We have received expressions of sympathy and support from leaders and people around the world. It has warmed my heart and all Danes deeply, we are so grateful for all the support that we have felt," she told the crowd.

In an evening of soft music and speeches, defiant Danes promised to uphold freedom of expression after reports the gunman was a Dane with Palestinian roots and a passion for Islamist issues.

The 22-year-old gunman opened fire on a cafe which was hosting a free speech debate on Saturday, killing one, and attacked a synagogue, killing a guard. He was later killed in a shootout with police in his neighbourhood of Norrebro, a largely immigrant part of the city with a reputation for gang violence.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.