Danish police have arrested two people with suspected links to al-Qaeda on suspicion of planning a bomb attack.
Danish police cordoned off a part of the capital, Copenhagen
Officials gave no details about the alleged plot, but said the two had already acquired explosive material.
Another six people of immigrant origin were briefly detained during a series of raids in and around Copenhagen, but were released after questioning.
Denmark's contribution to the US-led campaign in Iraq has prompted fears that militants may target the country.
It also drew anger from Muslims worldwide after a Danish newspaper last year printed cartoons depicting the Prophet Muhammad.
Police said they raided 11 addresses overnight on Monday in and around Copenhagen.
Buildings in the city's southern suburb of Ishoej and its Noerrebro district - both with large immigrant populations - were among those cordoned off by police.
The suspects had been under surveillance for some time and Danish investigators had liaised with "several foreign co-operation partners" before making the arrests, police said.
Later on Tuesday, two of the suspects, both 21, were remanded in custody for 27 days, with the first 13 days to be spent in solitary confinement.
"We have prevented a terror attack," Mr Scharf said, but he gave no details of what might have been the intended target of the alleged bombers.
"We would describe the main suspects as militant Islamists with international contacts, including leading members of al-Qaeda," he added.
Danish security services have conducted two major raids on suspected militants since 2005.
In February, a court sentenced a Danish citizen of Palestinian origin for involvement in a plan to blow up a European target.
Another three defendants in the trial were acquitted. One of them is awaiting a retrial.
And four men arrested last year in the city of Odense are due to go on trial on Wednesday on suspicion of planning terror attacks.