Greek MPs have voted overwhelmingly in favour of reforms demanded by the country's international creditors, clearing the way for talks on a new €86 billion international bailout.
The reforms include changes to Greek banking and an overhaul of the judiciary system.
Thousands demonstrated outside of parliament as the bill was debated. Protests briefly turned violent in Athens' Syntagma Square when petrol bombs were thrown at police.
There had been fears of a rebellion by lawmakers, but the Greek Prime Minister, Alexis Tsipras, was easily able to muster the support he needed. The measures received 230 votes in favour and 63 against, with five abstentions.
Among those who voted against were 31 members of his own Syriza party - a smaller rebellion than in last week's initial vote.
The former Greek Finance Minister, Yanis Varoufakis, was one of the rebels in the first vote who came back to vote with the government this time.
Speaking before the vote, Mr Tsipras stressed that he was not happy with the deal that had been imposed upon him by the rest of the eurozone. But he stressed that it was the only way to keep Greece in the single currency.
"We chose a difficult compromise to avert the most extreme plans by the most extreme circles in Europe," he told MPs.
Mr Tsipras is still riding high in the opinion polls but the deep divisions within Syriza could force the government to call early elections after being voted into power only at the beginning of the year.
What's next for Greece?
Representatives of the European institutions that will provide bailout funds will begin negotiations in Athens on Friday.
Last week, Greece passed an initial set of austerity measures imposed by its creditors. These were a mix of economic reforms and budget cuts demanded by the eurozone countries and institutions before bailout talks could continue.
This second set of measures are more structural. The more contentious ones, such as phasing out early retirement and tax rises for farmers - have been pushed back until August.
Negotiations will now begin on approving the terms of a third bailout, with the aim of completing a deal by the middle of next month.
The European Central Bank (ECB) has increased its financial lifeline to Greek banks by €900 million. The emergency cash injection, the bank's second in a week, is designed to keep the Greek banks afloat until a rescue package is concluded.
Greece's next major deadline is 20 August, when it must pay €3.2bn owed to the ECB, followed by a payment of €1.5bn to the IMF in September.
-BBC