Greece's embattled government on Wednesday survived a confidence vote crucial to avoiding a sovereign default, as thousands of protesters chanted insults outside parliament.

The assembly voted confidence in the government, reshuffled by Prime Minister George Papandreou to stiffen resolve behind a painful new austerity program, by 155 votes to 143 with two abstentions. All Papandreou's Socialist Party deputies voted solidly with the government.

"If we are afraid, if we throw away this opportunity, then history will judge us very harshly," Papandreou said in a final appeal for support before the vote.

The closely watched vote had an immediate impact with the euro making gains, although traders said continuing concerns about implementation of the measures contained the currency's advance.

Protesters besieged parliament in Syntagma square, chanting slogans against the politicians, shining hundreds of green laser lights at the building and into the eyes of riot police outside and pushing their hands forward in a traditional insult.