Thousands of people marched through Copenhagen in freezing winds to remember the victims of a weekend shooting that police say may have been an attempt to copy the massacre at Charlie Hebdo in Paris.

The memorial was held near the site of the first attack, where a meeting to discuss art and free speech ended in bloodshed after a gunman opened fire on Saturday. Like in Paris, a second attack targeted the Jewish community. The suspected gunman died in a shootout with police on Sunday. Two men have since been arrested on charges of having assisted him.

"We're full of sorrow, we're heavy, how should we react when terror and hate wash over our country?" Prime Minister Helle Thorning-Schmidt said at the rally. "Our answer is clear: when others try to scare us and split us, our answer will always be a strong community."