Four people have been arrested on suspicion of planning a terror attack against the Danish newspaper that printed the controversial Prophet Mohammed cartoons.
The Danish Security and Intelligence Service, known as PET, said three of the four men were Swedish residents.
Jakob Scharf, the head of PET, said that "an imminent terror attack has been foiled."
He also described some of the suspects as "militant Islamists".
PET said the group was 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".
Mr Scharf said the arrests were made after close cooperation with Swedish police.
The three suspects living in Sweden were a 44-year-old Tunisian citizen, a 29-year-old Lebanese-born man and a 30-year-old Swedish resident whose origin was not known. The final suspect was a 26-year-old Iraqi asylum seeker living in Copenhagen.
The four men face preliminary charges of attempting to carry out an act of terrorism.
They will face a custody hearing on Thursday.