Greek deputies narrowly approved another wave of lay-offs and wage cuts affecting thousands of public sector workers Thursday, hours ahead of a rare visit to the country by the German finance minister.
The sweeping bill of reforms, tied to the country's next tranche of EU-IMF loans, was passed despite days of street protests.
It gives thousands of civil servants -- including teachers and municipal police -- eight months on reduced salaries to find new posts elsewhere, or accept those offered to them.
Otherwise, they will lose their jobs.
Hundreds of protesters had gathered outside parliament for the late-night vote, a day after thousands had demonstrated in a general strike called against the reform.
The coalition government's majority carried most of the tougher articles by a vote of 153 to 140, the parliament speaker said.
It was a close call for the coalition, which has a five-seat majority in the chamber.
Two government deputies did not attend the vote, and a third had to be brought out of hospital to cast his ballot, reports said.
The bill's approval will enable Greece to receive its next instalment of 6.8 billion euros ($8.9 billion) in rescue funds cleared by eurozone finance ministers.
The vote came just hours before German Finance Minister Wolfgang Schaeuble was to make a rare visit to Athens Thursday, reportedly to help set up a support fund for struggling businesses.
His visit poses another challenge for authorities. Schaeuble is seen by some in Greece as a champion of the tough austerity policies that have gripped the country like a vice for the past four years.
A large security cordon will be thrown around Athens to ward off possible protests during his visit.
Greece has been forced to implement a series of painful reforms over the past four years in exchange for 240 billion euros in rescue funds put up by the European Union and International Monetary Fund.
The sweeping job, pay and pension cuts have hit Greeks hard, sparking mass protests and general strikes.
Overall, Greece must redeploy 25,000 civil servants and fire another 4,000 by the end of the year.
About 4,200 state staff are already due to be redeployed by the end of July.
The main opposition Syriza leftists have called the measure "human sacrifice", and said the country's creditors were motivated by "hatred" for demanding it.
Prime Minister Antonis Samaras on Wednesday defended the unpopular measure.
"Better days will come for our people," he said in a televised address hours before the vote.
"We will not let up. We will climb uphill and reach the end, which is not far."
He also announced a 10-percent drop in restaurant sales tax to boost the tourist season.
Samaras has been under heavy pressure this past month to hold his government together after losing one of his coalition allies in June in the wake of an earlier round of job cuts affecting state broadcaster ERT.
The bill also covers a partial overhaul of the tax system, including the introduction of new criteria for taxable income and the adjustment of tax thresholds.
Some 52 specialities taught at public vocational schools will also be abolished from next week according to the bill, which leading union GSEE has called a "tombstone" for Greek workers.
About 4,000 civil servants, according to a police source, staged a sit-in on Wednesday in Athens' central Syntagma square near the parliament to protest against the vote.
The orange jackets of school caretakers mingled with the khaki uniforms of municipal police officers.
"They have destroyed our dreams," said municipal worker Nekatorios Chargidis, in tears. "What are we going to be able to tell our children?"
Municipal employees have been on strike since Monday, with garbage piling up in the streets as a result.
On Tuesday, more than 20,000 people protested in Athens and Greece's second city Thessaloniki during a general strike called by the main unions.
Now in its sixth year running of recession and with the unemployment rate at a record 27 percent, Greece is not expected to post growth before 2014.