Chancellor Gerhard Schroeder told parliament that the fight was not a war against a state or the Islamic world.
Separately, the German Government approved measures that would allow authorities to outlaw religious groups that abuse their status to engage in criminal activities.
That proposal must still be approved by parliament. The government did not name any specific organisations it wants to ban.
Finance Minister Hans Eichel said on Wednesday that the government planned to spend an additional DM3bn ($1.4bn) next year to fight terrorism.
The funds - will which come from increased levies on tobacco and insurance - will go towards the intelligence agency and increased protection of airports and German embassies abroad.
Broad strategy
Chancellor Schroeder said a broad strategy was necessary in the fight against terrorism.
"A fixation on purely military measures would be fatal," he said.
The parliamentary vote is an expression of support, but does not commit Germany to any specific military action.
"Germany is ready to take risks, even military ones, but isn't prepared for adventures," Mr Schroeder said.
Correspondents say his comments may have been aimed at easing the concerns of his coalition partners the Greens, who are less inclined to support military actions than Mr Schroeder's Socialists.
Two opposition parties joined both coalition parties in supporting the declaration. Only the PDS, the former Communists, opposed it.
Domestic response
Germany is also considering revising its strict privacy laws and instituting new measures to prevent money laundering.
The German moves come in the wake of revelations that three of the hijackers who crashed planes into the World Trade Center and Pentagon had lived in Hamburg for several years.
The German magazine Stern reported that the German intelligence agency, the BND, believes up to 30 "terror cells" like the ones that carried out the hijackings may still be present in Germany.
There have also been reports that Osama Bin Laden, the Saudi-born dissident accused by the US of being behind last week's attacks, might have laundered money in Frankfurt. Bin Laden denies being behind the attacks.
Interior Minister Otto Schily said that the country had to give authorities greater powers to investigate suspected crimes.
"Data protection is fine, but it must not handicap the prevention of crime or the prevention of terrorism," he said.
There are about 3.1 million Muslims living in Germany, a country of some 82 million.
The Reuters news agency said that about 31,000 Muslims belong to Islamist organisations, and that authorities have identified more than 3,000 of them as "potential extremists".
At present, authorities have no power to outlaw religious organisations.