As thousands of protestors gathered outside the parliament building, Greek lawmakers approved a package of austerity measures needed to secure a bailout of 6.8 billion euro (almost $9 billion).
It was the first major test for Prime Minister Antonis Samaras and since his two-party coalition lost an ally over last month’s shutdown of the state broadcaster.
The legislation was narrowly approved by lawmakers in an article-by-article vote, with some articles gaining only a couple of votes more than the required majority of 151 votes.
Thousands of teachers, municipal police officers and unemployed people have rallied in the past week in protest against the measures, which include layoffs for more than 25,000 people.
Since May 2010, Greece has largely remained afloat by loans financial assistance for Athens from EU member states and the International Monetary Fund (IMF).
In exchange, the lenders had insisted that Greece enact a series of tough economic reforms, including spending cuts and tax hikes. The austerity measures led to a dramatic increase in poverty and unemployment.