Updated

COPENHAGEN, Denmark -- Five men planning to shoot as many people as possible in a building housing the newsroom of a paper that published cartoons of the Prophet Muhammad were arrested Wednesday in an operation that halted an imminent attack, intelligence officials said.

Denmark's intelligence service said it arrested four men in two raids in suburbs of the capital, Copenhagen, and seized an automatic weapon, a silencer and ammunition. Swedish police said they arrested a 37-year-old Swedish citizen of Tunisian origin living in Stockholm.

"An imminent terror attack has been foiled," said Jakob Scharf, head of the Danish Security and Intelligence Service, or PET. He described some the suspects as "militant Islamists with relations to international terror networks" and said that more arrests were possible.

PET said it seized a 44-year-old Tunisian, a 29-year-old Lebanese-born man and a 30-year-old who were living in Sweden and had entered Denmark late Tuesday or early Wednesday. The fourth person detained was a 26-year-old Iraqi asylum-seeker living in Copenhagen.

The Danish intelligence service said the group had been planning to enter the building where the Jyllands-Posten daily has its Copenhagen newsdesk and had wanted "to kill as many of the people present as possible." The four men face preliminary charges of attempting to carry out an act of terrorism. They will face a custody hearing Thursday.

Zubair Butt Hussain, a spokesman for the Muslim Council of Denmark, called the plan "extremely worrying."

The organization "absolutely condemns any act of terrorism regardless of the motives and motivations that may lie behind," Hussain said.

There have been at least three attacks against either the Danish newspaper or the artist who drew the most contentious of 12 cartoons published by the daily in 2005 as a challenge to perceived self-censorship.

In early 2006, reaction to the drawings sparked violent protests in Muslim countries where demonstrators said the drawings had profoundly insulted Islam. Islamic law generally opposes any depiction of the prophet, even favorable, for fear it could lead to idolatry.

Scharf said "there was no need to raise the terror threat alert level" in Denmark.

The men were arrested in Greve, south of Copenhagen, and Herlev, west of the Danish capital.
Danish Justice Minister Lars Barfoed described the plot as "terrifying."

"The group's plan to kill as many as possible is very frightening and is probably the most serious terror attempt in Denmark," he said.

The head of Sweden's security police, Anders Danielsson, said that "it has been possible to avert a serious terror crime in Denmark through efficient and close cooperation between PET and the (Swedish) security police."

Danielsson said the suspects who are residents in Sweden are also being investigated for suspected terror crimes in that country.