Defense Minister Franz Josef Jung said the threat had been "imminent."
Officials said the arrests took place on September 4, and that police had carried out searches across the country.
Federal Prosecutor Monika Harms said the suspects had ties to a group she named as the Islamic Jihad Union.
"The Islamic Jihad Union has been up to now a group predominantly active in Central Asia, that split off from the Islamic Movement of Uzbekistan," Harms told a news conference. "The group has since expanded its circle of activity from [that area] -- in regard to the global jihad -- to other [parts of the world], including Europe. This expansion of its activities may be viewed as being influenced by Al-Qaeda."
Harms said two of the suspects had German citizenship while the third was a Turkish national. She said they had all received training in Pakistan.
The suspects are to appear before a judge later today.
Threats Mount In Northern Europe
Meanwhile, Danish police arrested on September 3 two people with suspected links to al-Qaeda on suspicion of planning a bomb attack.
Officials gave no details about the alleged plot, but said the two had already acquired explosive material.
Until now, northern Europe has been spared terrorist attacks of the sort that have hit Spain and Britain. But the arrests this week have highlighted the threat these countries also face.
Florian Geyer, an analyst of the Center for European Policy Studies, says it is too early to say whether new attacks have been really prevented.
But he says Islamic militants have reasons to attack the two countries.
He says that Germany, though it opposed the U.S.-led invasion of Iraq, is actively participating in military operations in Afghanistan. The country also houses U.S. bases.
As concerns Denmark, Geyer says it is due to complete the withdrawal of its contingent of soldiers in Iraq this month. But it may have drawn lasting outrage from extremists in the Muslim world by the publication in 2005 in a Danish newspaper of cartoons satirizing the Prophet Muhammad. The cartoons sparked a controversy that lasted well into last year and included violent protests in several Muslim countries:
"I think it is still there in the public debate in Denmark, this surprising outrage that was connected to this cartoon controversy, and it might be that it is an underlying feature also, an underlying motivation for radicalized people to commit these acts in Denmark against the Danish state," he says.
Geyer says he observes a growing terrorism threat in the EU posed by Islamic radicals.
But he cautions that though radicals claim to fight for Islamic values, the wider public in the EU should not mix them with millions of Muslims who are peaceful and have nothing to do "with a small group of extremists."
(with agency material)