The Spanish Parliament has approved the deployment of up to 1,100 troops to southern Lebanon as part of an international peacekeeping force.
Only two out of 306 parliamentarians voted against the deployment after five hours of debate.
The main opposition conservative People's Party (PP) also gave its blessing in Thursday evening's special session, but criticised the socialist government for misleading the public on the dangers of the mission.
The PP accused Prime Minister Jose Luis Rodriguez Zapatero of sending Spanish troops to another dangerous region after electing to withdraw them from Iraq in 2004.
But the government said the UN-sponsored peacekeeping operation in Lebanon is not comparable to the Iraq war, which representatives of Zapatero's Socialist Party have described as "illegal and immoral".
Zapatero defended the mission at a joint press conference with UN Secretary General Kofi Annan Thursday, saying the troops would be "where we have to be" and added that they assumed risks common in peace missions.
Defence Minister Jose Antonio Alonso also admitted that the mission would be difficult and not without risk, but said it was Spain's "ethical duty" to contribute to peace in the region.
Alonso said 600 troops, primarily of a navy infantry battalion, were ready for immediate duty. Spain will eventually take command of a multinational brigade expected to include troops from Portugal, Belgium, Poland, Ireland and Finland.