|The cartoons of the Prophet Muhammad have drawn widespread protests since their publication in Sept 2005 [AFP]
Danish and Swedish authorities have arrested five people suspected of planning a "Mumbai-style" attack in Copenhagen against a newspaper that printed controversial cartoons of the Prophet Muhammad.
Three of the four people arrested in Denmark were residents of Sweden.
The Danish Security and Intelligence service (PET) said the suspects had entered the country overnight on Tuesday.
The men were arrested in Greve, south of Copenhagen, and Herlev, west of the Danish capital.
During the raids, police found an automatic weapon, a silencer, live ammunition and plastic strips that could be used as handcuffs, PET said.
A fifth man was arrested in Sweden, according to the Swedish security police (SAPO).
Jakob Scharf, the head of PET, said that an "imminent terror attack has been foiled". He described some of the suspects as "militant Islamists" and said that more arrests were possible.
The group was planning to enter the building where the Jyllands-Posten daily newspaper has its Copenhagen office, and wanted to "kill as many of the people present as possible", according to PET.
Scharf said the arrests were made after close co-operation with Swedish police. Reports indicate that the Danish and Swedish police had been aware of the plot and had kept the men under surveillance for some time.
Alan Fisher, Al Jazeera's correspondent in London, said that while the police were not making the basis of their investigation public, "what we can deduce from what we're being told is that this was an ongoing operation, something that obviously had been carried out over a number of weeks".
"It involved both the Danish intelligence services and their Swedish counterparts. Clearly the police thought that the attack was imminent, that is why they made the move when they did," said Fisher.
Scharf said that as the attempt had been thwarted, there was "no need to raise the terror threat alert level" in Denmark.
'Links to terror networks'
The three suspects arrested in Denmark, who were living in Sweden, were identified as a 44-year-old Tunisian citizen, a 29-year-old Lebanese-born man and a 30-year-old Swedish resident whose origin was not immediately known.
The fourth suspect is a 26-year-old Iraqi asylum seeker living in Copenhagen.
The man arrested in Sweden is a 37-year-old Swedish citizen from Tunisia.
Fisher said the Danish intelligence service had described the men as "Islamic militants with links to international terror networks".
Our correspondent said that Lars Barfoed, the Danish justice minister, had described the plot as the "most serious attempt in Denmark so far".
The four men in Danish custody face preliminary charges of attempting to carry out an act of terrorism.
They will face a custody hearing on Thursday. The man arrested in Sweden will face similar charges, according to Anders Danielsson, the head of Sweden's security police.
Swedish police have said that the suspects are not linked to an attempted suicide bombing in Stockholm on December 11, when a man blew himself up as he was preparing to set off the bombs.
Condemning the planned attack, Loekke Rasmussen, the Danish prime minister, said he was "shocked that a group of people have concrete plans to commit a serious terrorist attack in this country".
"I want to stress that regardless of today's event it remains my conviction that terrorism must not lead us to change our open society and our values, especially democracy and free speech," he said.
Danielsson said: "We have known for ... years that Sweden and the Scandinavian countries have not been safe havens, but countries where we know people have stayed and planned to commit terrorist crims in other countries."
Kevin McGwinn, managing editor at the Copenhagen Post, told Al Jazeera that Jyllands-Posten is aware of the threats against it, and treats them very seriously.
"This is the seventh time since 2008 that either the building itself or people associated with the newspaper have been either threatened with attack or actually physically attacked," he said.
"And they have upped security both at their Copenhagen offices as well as the headquarters in another part of the country very seriously. They are fully aware of the threats against them."
The JPPOL media group building, which includes Jyllands-Posten, is protected by metal fences and has guards at all entrances.
Mail is scanned and newspaper staff require identity cards to enter the buildings and certain floors.
"It is appalling for our group, for our employees and their families to see their workplace threatened,"
Lars Munch, JPPOL's chief executive, said.
Source: Al Jazeera and agencies