Five suspected Islamist militants have been arrested for planning to attack a Danish newspaper that printed cartoons of the Prophet Muhammad in 2005.
The men wanted to “kill as many people as possible” at the Copenhagen offices of Jyllands-Posten, officials said.
Denmark’s Justice Minister Lars Barfoed said it was the country’s most serious terrorist plot.
Four suspects – including three Swedes – were held in Denmark, and the fifth was detained in Sweden, police said.
The four held in Denmark were picked up in raids in Greve and Herlev, near Copenhagen, where police found an automatic weapon, a silencer and live ammunition, according to Denmark’s security agency, Pet.
The agency’s chief, Jakob Scharf, said the four held in Denmark had been planning to enter the building housing the Jyllands-Posten and “kill as many of the people present as possible”.
He said an “imminent terror attack” had been foiled and described some of the suspects as “militant Islamists”.
Mr Barfoed said in a statement that the plot was “outrageous” and described it as “the most serious attempt at terror so far in Denmark”.
Cartoonist under guard
The publication of the cartoons, one of which depicted Muhammad with a bomb-shaped turban, caused mass protests among Muslims across the world.
Muslims regard any visual representation of the Prophet as blasphemous.
Saudi Arabia recalled its Copenhagen ambassador, Danish firms were forced to scale back operations in some parts of the world, and gunmen raided an EU office in Gaza to demand an apology.
But many in the West have defended the media’s right to publish the caricatures, and several European newspapers have republished some of the drawings.
Kurt Westergaard, the cartoonist who drew the image of the turban bomb, has been honoured with awards by free-speech groups, but he now lives under police guard amid death threats from radical groups.
He was the subject of an attempted attack in January when a Somali man got into his home armed with a knife and an axe.
And police across Scandinavia have arrested several groups of people in raids linked to the cartoons.
Three men detained in Norway in July were suspected of planning attacks to avenge the cartoons.
In September, a Chechnya-born Belgian was arrested after a small explosion in Copenhagen, which police linked to the cartoons.