Greek Prime Minister Alexis Tsipras contained a rebellion in his left-wing Syriza party to win parliamentary approval on Thursday for a second package of reforms required to start talks on a financial rescue deal.
A first set of reforms that focused largely on tax hikes and budget discipline triggered a rebellion in Syriza last week and passed only thanks to votes from pro-EU opposition parties.
The bill that lawmakers voted on early Thursday covered rules for dealing with failed banks and speeding up the justice system - two more conditions set by the euro zone and IMF to open negotiations on an 86 billion euro rescue loan.
The legislation easily passed with the backing of 230 votes in the 300-seat chamber, once again due to opposition support.
But 36 Syriza deputies - or almost a quarter of the party's 149 lawmakers - voted against the overall bill or abstained, though significantly for Tsipras that was a smaller rebellion than the 39 deputies who defied him in last week's vote.
"We made tough choices, and I personally made difficult, responsible choices. Today we must all redefine the possibilities ahead of us given the new circumstances," Tsipras said in an appeal to parliament to back the reforms.
"We chose a difficult compromise to avert the most extreme plans by the most extreme circles in Europe."
Tsipras has publicly said he disagrees with measures demanded by Greece's euro zone peers and the IMF for talks to proceed on a third bailout to save the country from bankruptcy.
But after he made a U-turn by accepting a deal at the 11th hour to keep his country in the euro, he told party hardliners to face reality and back the package.
Even so, hardline Left Platform lawmakers from the Syriza party, who opposed last week's bill, rejected this week's law as well and complained about the length of the bill, which covered more than 900 pages.
Together with his coalition partners from the right-wing nationalist Independent Greeks, Tsipras has 162 seats in the 300-seat parliament.
Last week's rebellion cut his support to just 123 votes and government officials have said elections are likely in September or October once the package is agreed.
"We might go to elections, when this is needed," government spokeswoman Olga Gerovasili earlier told local radio, adding that it would not be helpful now as the country prepares to negotiate the new bailout deal. "We are trying to bring the situation back to some sort of normality," she said.
European Economic and Monetary Affairs Commissioner Pierre Moscovici told reporters in Brussels he was confident the parliament would adopt the bill. Creditor institutions were seeking to conclude talks with Greece on a third bailout in the second half of August, he said.
The government has said it hopes negotiations on the bailout deal can start this week and be wrapped up by Aug. 20.
In the first signs of a return to normal, Greek banks reopened on Monday and Athens paid debts due to the European Central Bank and International Monetary Fund. The ECB increased its emergency funding by 900 million euros, the same amount it provided last week.
On Tuesday, Standard & Poor's upgraded Greece's sovereign credit rating by two notches.
But fresh austerity measures are hard to accept in a country whose economy has contracted by a quarter during five years of crisis and where unemployment is more than 25 percent. Rallies called by the main public sector union ADEDY, the communist-affiliated party PAME and anti-establishment groups drew several thousand people in front of parliament.
Apart from some minor incidents, there was no repeat of the violence seen at a rally last week, when masked youths hurled petrol bombs at police as lawmakers were debating the first bailout bill.
With mistrust among euro zone countries still high despite the deal struck last week to launch bailout talks, a senior German lawmaker in Chancellor Angela Merkel's conservative party warned Greece it would not get aid if it backtracked on reforms.
"We are keeping a close eye on whether Athens not only adopts the reforms but also implements them," Gunther Krichbaum, chairman of the German parliament's Europe committee, told the newspaper Bild. "Greece must fulfil the conditions, otherwise the money cannot flow."
The bill does not include pension reforms curbing early retirement or increasing tax rates paid by farmers - a step strongly opposed by the conservative New Democracy party and many Syriza deputies.
The fact that these measures were not included in the bill aroused some media speculation that Athens was backtracking on reform commitments. Finance Minister Euclid Tsakalotos told lawmakers Greece had agreed with its lenders to deal with these issues during bailout talks.
The bill adopts into Greek law new EU rules on dealing with failed banks, imposing losses on shareholders and creditors of ailing lenders before any taxpayers' money can be tapped in. It also toughens law on foreclosures, though Tsipras pledged his government would not allow banks to seize primary residences.
It also includes the reform of the judicial system, which is similar to a law that Syriza had opposed before it came to power, and which hardline Left Platform lawmakers particularly oppose.
Greece's creditors say the measure is needed to speed up court proceedings and reduce their cost. Greek leftists say it violates rights to a fair hearing and could favour creditors and hurt workers in bankruptcy cases.