Spain's parliament has ratified labour reforms designed to bring down high unemployment.
Measures include promoting youth employment and cutting the cost of firing workers, which critics say makes employers reluctant to hire more staff.
Changes to the labour law follow spending cuts introduced last month in a bid to cut the large budget deficit.
Spain's two main unions have called a general strike on 29 September in protest at the tough economic measures.
Only members of Prime Minister Jose Luis Rodriguez Zapatero's Socialist Party voted in favour of the labour reforms.
Members of the two biggest opposition parties, the Popular Party (PP) and Catalan nationalist party (CIU), abstained and eight deputies voted against the moves.
Spain's unemployment rate of 20% is the highest in the eurozone.
Some economists have laid the blame on the cost of firing workers which encourages the use of temporary contracts that have few benefits and rights.
Workers on full contracts are entitled to severance pay of as much as 45 days per year worked, one of the highest levels in Europe.
Under the reforms this would be cut to 33 days for some contracts.
Labour Minister Celestino Corbacho told parliament that more than eight million workers who are either unemployed or on temporary contracts "will directly benefit" from the reform plan.
He said it would increase flexibility for companies without reducing job security, "promoting stable employment instead of uncertainty".
The labour reforms can still be amended in parliament over the coming months.
"Labour reform is necessary but this is not labour reform, it is the reform of (job) dismissals," said PP spokeswoman Soraya Saenz de Santamaria.
"We intend to enhance it with our amendments," she said.
Spain's high unemployment and large budget deficit had prompted speculation that it might be seeking a Greek-style bailout.
But the head of the International Monetary Fund, Dominique Strauss-Kahn, calmed those fears during a recent visit to Madrid saying Spain was taking the right measures for economic stability.