COPENHAGEN — When a would-be assassin disguised as a postman shot at — and just missed — the head of Lars Hedegaard, an anti-Islam polemicist and former newspaper editor, this month, a cloud of suspicion immediately fell on Denmark’s Muslim minority.

Politicians and pundits united in condemning what they saw as an attempt to stifle free speech in a country that, in 2006, faced violent rage across the Muslim world over a newspaper’s cartoons of the Prophet Muhammad. Since then, the newspaper that first printed the images, Jyllands-Posten, has been the target of several terrorist plots.

However, as Mr. Hedegaard’s own opinions, a stew of anti-Muslim bile and conspiracy-laden forecasts of a coming civil war, came into focus, Denmark’s unity in the face of violence began to dissolve into familiar squabbles over immigration, hate speech and the causes of extremism.

But then something unusual happened. Muslim groups in the country, which were often criticized during the cartoon furor for not speaking out against violence and even deliberately fanning the flames, raised their voices to condemn the attack on Mr. Hedegaard and support his right to express his views, no matter how odious.