Germany's parliament has voted to send military support to the US-led coalition fighting Islamic State (IS) militants in Syria.
MPs approved the plan for a German non-combat role by 445 votes to 146.
Tornado jets - for reconnaissance - a naval frigate and 1,200 soldiers will be sent to the region.
The vote comes after a French request following last month's Paris attacks. Ministers believe Germany is now an IS target too.
On Thursday, British warplanes carried out their first air strikes on IS targets in Syria after the country's parliament authorised the military operation.
This will be Germany's biggest current military operation abroad.
The mandate will initially last a year and will cost €134m (£97m; $146m).
Chancellor Angela Merkel relied on MPs from the ruling CDU/CSU coalition to back the motion for military involvement.
Germany's opposition Left party rejected the mission, while most of the parliament's Green MPs also voted no, according to reports.
Ahead of the vote, Green Party chairwoman Simone Peter expressed concern about the legal basis for the mission without a specific UN resolution authorising it.
But Justice Minister Heiko Maas told Tagesspiegel newspaper on Friday that he had no doubts about the legal legitimacy.
"We have to stop these terrorist murderers," he said. "We will not succeed in this by military means alone, but we will not succeed without it either."
After the Paris attacks last month the UN Security Council adopted a French resolution calling on UN member states to "take all necessary measures" to "prevent and suppress terrorist acts" committed by IS, al-Qaeda and affiliated "terrorist" groups.
France also invoked an EU Treaty clause on mutual defence - Article 42.7 - to get help from its EU partners in the fight against IS.
The German army says forces will be deployed "in and over Syria where IS is operating, on the territory of states whose governments have given approval [to Germany], in the eastern Mediterranean, Gulf, Red Sea and adjoining seas".
Aside from aircraft, the naval frigate Sachsen will help support the French aircraft carrier Charles de Gaulle in the eastern Mediterranean.
Germany will boost to 150 its 100-strong contingent of troops in northern Iraq. They are helping to train Kurdish Peshmerga forces who are fighting IS. Germany is also providing arms and ammunition for them.
Germany's armed services association has cautioned against entering a conflict without clearly defined goals.
"I'm working on the basis that this fight, if it is taken seriously, will go on for well over 10 years," the association's chairman Andre Wuestner told German TV this week.
Until now, Germany's biggest foreign mission has been in Afghanistan, but that has gradually wound down to a force of just less than 1,000.