ATHENS, Greece (AP) -- Greece's Parliament narrowly approved a new batch of austerity measures early Thursday, including thousands of public-sector job cuts and transfers, demanded by the country's creditors to keep vital bailout loans flowing.
Lawmakers in the 300-seat house backed the cutbacks in an article-by-article vote, with two of the governing coalition's 155 deputies failing to back crucial articles.
It was the first major test for conservative Prime Minister Antonis Samaras since a left-wing party abandoned his coalition government last month.
Greece has been kept out of bankruptcy since it started receiving rescue loans in 2010 from the International Monetary Fund and other countries using the euro, but austerity measures imposed in return have caused a dramatic increase in poverty and unemployment.
The new legislation will put 12,500 public-sector staff, mostly teachers and municipal workers, in a program that subjects them to involuntary transfers and possible dismissals. It will also pave the way for 15,000 layoffs by the end of next year.
City halls across the country have been closed this week, with uncollected rubbish piling up on the streets, and unions held a general strike on Tuesday against the proposed cuts.
"I fully understand the hardship the Greek people are going through during the great crisis," Finance Minister Yannis Stournaras said during the debate. "But I am fully convinced that the path we have chosen is correct."
Some 3,000 people protested outside Parliament in central Athens ahead of the vote, chanting anti-austerity slogans in a third straight day of protests.
But the reaction — in the midst of the summer holiday season — was subdued compared to previous, often violent demonstrations that brought tens of thousands into the streets.
The crucial after-midnight vote came hours before a visit to Athens by German Finance Minister Wolfgang Schaeuble, planned amid security measures that Greece's left-wing main opposition party denounced as "fascist and undemocratic."
The measures include a ban of all demonstrations in the city center, including the area outside Parliament that has been the focus of past violent protests.
The 13-month-old coalition government claims it has already made progress in stabilizing the shattered economy. On Wednesday, Samaras made a televised statement to announce a sales tax cut for restaurant and catering services from 23 percent to 13 percent — the first tax reduction since the crisis started in late 2009.
Greece's lurching attempts to implement its austerity pledges, coupled with political upheaval in Portugal — which is also in a bailout program — have renewed fears that Europe's debt troubles could flare up again.
Samaras is due later Thursday to hold talks with Schaeuble, who is expected to discuss a program of German support for small and medium-sized Greek businesses. And on Sunday, he will meet with U.S. Treasury Secretary Jacob Lew, who will stop in Athens on his way back from a G-20 meeting in Moscow.
A Treasury Department statement said Lew's visit comes ahead of a planned meeting between Samaras and U.S. President Barack Obama in Washington next month.
Schaeuble, widely resented in Greece as the driving force behind the country's painful cutbacks, said his one-day trip is meant to display confidence in Greek efforts at recovery.
"I can well understand people in Greece — it's just that we have to help Greece get on a better path," he told Germany's ARD television Wednesday evening. "The only thing that will really help people in Greece is achieving better economic development, they are on the right track ... it will continue to pay off."
But public sector staff targeted in the cuts said there was no justification for their treatment.
Sitting on the hot asphalt under an umbrella during a protest Wednesday, 47-year-old Maria Denida joined other women who travelled from the northern city of Thessaloniki to protest outside parliament, together with many of the country's mayors.
"I've been a school guard for 13 years and suddenly we find out we have no job. They say we'll be suspended. But that means we'll be fired," Denida said, her voice cracking with emotion.
"All of us have kids, unemployed people at home, and bills we can't pay. We were getting 780 euros ($1,000) a month. And if we lose that, we're finished."
Municipal police officers from around Greece rallied through the capital's center with their motorcycles and patrol cars. The force, whose duties include monitoring street vendors and parking, is due to be disbanded and incorporated into national police after officers are suspended on reduced pay for up to eight months.
"We cannot understand why this is happening," union head Apostolos Kossivas told The Associated Press. "We asked the government if there was any financial gain — they said no. Did we provide a bad service? — They said no."
"So we think they just wanted to make up the quota they needed for job cuts, and are proceeding without a plan," Kossivas said.
Geir Moulson in Berlin contributed.