George Papandreou of Greece won a crucial vote of confidence early Wednesday, with all 155 lawmakers of his Socialist party expressing their support for his teetering government, a few seats above the absolute majority of 151 votes required by Greece’s 300-seat Parliament. There were 143 votes against Papandreou and two abstentions.

The New York Timesreports the passage averts early elections and a stalled government at a critical moment. Now, Papandreou must face an even bigger challenge next week, when Parliament votes on the new slate of measures, including tax hikes, wage cuts and state privatization, which are required by the European Union, the European Central Bank and the International Monetary Fund before it releases the next segment of aid that Greece needs to meet expenses through the summer.

According to the paper, before the vote, Papandreou called on Parliament and the people to show responsibility and seize “a critical opportunity to save the country from default.”

“All Greeks have the duty and the ability to change this country,” he said. He defended the country’s foreign creditors, who have become a lightning rod for popular fury, saying, “They are giving us a helping hand in difficult times.”

But The Times notes tens of thousands of people gathered outside Parliament, many voicing rage at foreign lenders they see as a kind of occupying power and at a government they blame for Greece’s financial crisis.

For three weeks, protesters have come together nightly in the square to air their grievances over a crisis that endures despite a round of painful austerity measures, leaving the government struggling to agree on another round of cuts to further diminish the country’s bloated public sector and win urgently needed international bailout money. Many in the crowd wore stickers aimed at Parliament that read, “We won’t leave until they leave.”

As the vote neared, they shouted their anger.

Inside, in the debate leading up to the vote, Antonis Samaras, the leader of New Democracy, the main opposition party, repeated his calls for a renegotiation of the new austerity package. Conservatives briefly walked out, but returned for the vote, according to the paper.

On Tuesday, the Socialist party appeared to rally around Papandreou following a week of turmoil in which two Socialist members of Parliament gave up their seats in protest at what they saw as the prime minister’s failures of leadership.