Greece's shaky coalition government scraped through a vote on Wednesday on a bill to sack public sector workers as thousands chanting anti-austerity slogans protested outside parliament.
The vote was the first major test for Prime Minister Antonis Samaras's two-party coalition since losing an ally over the abrupt shutdown of the state broadcaster last month, which left it with a scant five-seat majority in the 300-seat parliament.
After midnight on Wednesday, 153 lawmakers out of the 293 present voted in favour of the bill, whose passage was required to unlock nearly 7 billion euros ($9.2 billion) in aid from European Union and International Monetary Fund lenders.
(Read More: Greece faces September funding gap: Report)
The bill includes deeply divisive plans for a transfer and layoff scheme for 25,000 public workers - mainly teachers and municipal police - that had triggered a week of almost daily marches, rallies and strikes in protest.
About 5,000 Greeks flooded the street outside parliament as the vote neared, with some chanting: "We will not succumb, the only option is to resist" and holding aloft black balloons - though turnout was much smaller than in protests last year.
"After 12 years on the job, they fire us in one night," Patra Hatziharalampous, a 52-year-old school guard in uniform said between sobs. "If they have any guts, they should say no to the bailout and take some of the bill's articles back."
The reforms were passed hours before German Finance Minister Wolfgang Schaeuble - Europe's leading proponent of austerity blamed by many Greeks for their woes - arrives in Athens for his first visit to Greece since the debt crisis began in 2009.
Before the vote, Samaras announced Greece's first tax cut since its crisis began nearly four years ago, in a bid to placate protests and an increasingly restive public mood.
(Read More: Greek PM caught swearing on camera during tax speech)
"We will not relax," Samaras said in a surprise television address to announce that value-added tax (VAT) in restaurants would be cut to 13 percent from 23 percent starting Aug. 1.
"We will continue climbing up the hill, we will reach the top, which is not far, and better days will come for our people."
In a clip that became an instant hit on social media site Twitter, television stations accidentally showed Samaras fumbling at an initial attempt to read the statement and swearing "Damn my head, ******" as he walked off the podium.