COPENHAGEN  As part of the prolonged national headache caused by a Danish newspaper’s decision to publish 12 caricatures of the Prophet Muhammad in 2005, last weekend’s attack on one of the cartoonists responsible had a certain awful inevitability about it.

Once again, the motivation was fury, still fresh after all this time, over the dissemination of the cartoons. And once again, the circumstances  in this case, the news that the person accused of the attack was a Muslim immigrant suspected of having links to terrorists  has led Danes into an uneasy examination of their relationship to their Muslim population.

In a country that already has one of the strictest immigration policies in Western Europe, the attack has also spurred politicians from across the political spectrum to demand ever more stringent rules about who should be allowed to live here.

“I’m sorry to say, but it’s déjà vu  every time we experience an episode, then in 10 minutes we have them saying we have to have a new law,” said Naser Khader, a member of Parliament and the spokesman on foreign affairs and immigration for the Conservative People’s Party. He was speaking of the increasingly powerful Danish People’s Party, whose votes the government relies on to pass legislation and whose populist, anti-immigrant rhetoric has informed and inflamed debate in recent years.