The lower house of the Spanish Parliament has authorised the deployment of soldiers to aid the Iraqi Army in their fight against Islamic State (IS) militants.
Of the total 329 Congress of Deputies of Spain lawmakers, 314 supported the proposal of Spanish soldiers training the Iraqi security forces, RIA Novosti reported.
Spanish Defence Minister Pedro Morenes said: "IS is a rather strong enemy. They have at least 30,000 militants, about 12,000 of which are foreigners.
"They have a lot of seized artillery ammunition in northern and central parts of the country
"The participation of Spain in the international coalition against the IS shows [the] country's willingness to maintain peace and stability in the world."
Approximately 300 Spanish soldiers are scheduled to be deployed to Iraq by the end of the year or early next year, to train the Iraqi military in special and mine clearance operations.
However, the Spanish troops will not participate in any military operations against the militants.
The soldiers are expected to stay close to the Iraqi city of Nasiriyah for up to six months, with the operation costing the Spanish Government approximately $44m, according to Morenes.
Last week, media reports indicated that Spain had offered its bases in Moron and Rota to US aircraft carrying logistics support for operations in northern Iraq.
The US and its allies, including the UK, are already training Iraqi soldiers to defeat the IS, which has seized large parts of Iraq and Syria in recent months.
In a separate development, the Iraqi Kurdish lawmakers have cleared a plan to send armed peshmerga fighters to the Syrian town of Kobani to reinforce Syrian Kurds fighting IS militants.
Iraqi Kurdish lawmaker Mahmoud Haji Omer was quoted by Reuters as saying: "Today in parliament, we agreed to send the peshmerga forces to Kobani as soon as possible."
Earlier this week, Turkey agreed to allow Iraqi Kurds to cross its borders to defend Kobani, where IS fighters are advancing despite intensified coalition air strikes.