Greece's government will approve its new austerity package on Wednesday after it survived a confidence vote, clearing the first hurdle in a battle to secure emergency loans and avert the euro zone's first sovereign debt default.

Prime Minister George Papandreou's reshuffled cabinet aims to get parliament approval for a package of spending cuts, tax hikes and state asset sales by June 28 and then push through laws needed to implement it within the next two weeks to avoid missing out on 12 billion euros ($17 billion) in aid and plunging into bankruptcy.

The vote follows a European ultimatum linking the release of the next installment of a 110 billion euro EU/IMF aid package due in two weeks to a new five-year belt-tightening plan.

Without the loans, Athens will run out of cash next month and policymakers fear a default would send shock waves through the global financial system.

The euro rose in hopes that the immediate threat of market chaos could be avoided, but the gains were short-lived as traders cited concerns about implementation of harsh austerity measures in a nation bruised by its worst recession in 37 years and doubts about Greece's ability to reduce its debt burden without some form of restructuring.

The reaction of the people is going to be critical. If we see cars burning and protests tomorrow, then all this short term success is going to get sucked out the window, said William Larkin, a fixed-income portfolio manager at Cabot Money Management in Salem, Massachusetts.

DEFAULT ONLY WAY OUT FOR GREECE?

Speaking just hours after the vote, Mohamed El-Erian, head of Pimco, the world's biggest bond fund, said he expected Greece to end up defaulting on its debt.

For the next three years, we're going to see different economies work out different problems. For European economies, especially Greece, it would be through default, El-Erian told a conference in Taipei.

Papandreou managed to stifle dissent within his party last week by replacing unpopular government figures with critics of the austerity plan and repeatedly hammering home the message of what was at stake.

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 confidence vote.

All of Papandreou's Socialist Party deputies voted solidly with the government, handing him a victory by 155 votes to 143 with two abstentions, while thousands of protesters besieged the parliament building, shouting insults at politicians and shining hundreds of green laser lights at the building and at Greek police.

Having already missed targets agreed in its first, year-old bailout, Athens needs the reforms to keep receiving those funds and secure a second bailout worth an estimated 120 billion euros.

The new mid-term plan envisions raising 50 billion euros by selling off state firms and includes 6.5 billion in 2011 fiscal consolidation, almost doubling existing measures that have helped extend a deep recession into its third year.

Most analysts remain skeptical that Greece will be able to reduce its vast public debt pile of 340 billion euros, 1.5 times its annual economic output and more than 30,000 euros for each of its 11.3 million people, even if the reforms are implemented.

But for now both markets and European policymakers are willing to give Greece the benefit of the doubt.

Although this clearly is not going to be a long-term fix, investors see this as a chance that the can will be kicked further down the road, said David Dietze, Chief Investment strategist at Point View Financial Services.

ANGER BUILDS IN ATHENS

European Commission President Manuel Barroso, who had piled on pressure before the vote, expressed relief.

Tonight's vote in the Greek Parliament removes an element of uncertainty from an already very difficult situation, he said, adding that Papandreou could now concentrate on implementing the reforms.

Acting IMF chief John Lipsky sent a similar message, saying international lenders were willing to help peripheral euro zone economies as long as they tried to carry out reforms. He said the Greek fiscal system was broken but could be fixed with the right political will.

The cabinet will meet on Wednesday afternoon to approve a draft bill implementing the austerity plan, officials said. It will aim to get it passed in parliament by June 28 and then it must push through laws implementing the reforms -- potentially more difficult as it will tackle individual privatizations, tax measures and spending cuts -- in time for an extraordinary meeting of euro zone finance ministers on July 3.

As parliament debated the confidence motion, demonstrators stepped up their protests in the square, where hundreds have camped for weeks to show their opposition to more austerity, which has deepened the worst recession for 37 years.

I believe we should go bankrupt and get it over with. These measures are slowly killing us, said 22-year-old student Efi Koloverou. We want competent people to take over.

Glykeria Madaraki, a 39-year-old unemployed woman, said: God help us. There is no way these people are getting us out of the crisis. I feel insecure and I see my country being sold off. They didn't ask what we think about all this. I want elections.

Inside parliament the opposition poured similar disdain on the government.

This is not a program to salvage the economy, it's a program for pillage before bankruptcy, said Alexis Tsipras, head of the small opposition Left Coalition.

Newly appointed Finance Minister Evangelos Venizelos, in an attempt to answer a key grievance of protesters, told parliament the government's top priority would be to build a fairer tax system.

Inspectors from the International Monetary Fund and European Union arrived on Tuesday to examine a request by Venizelos for changes to the mid-term plan. Greece's government has said the lenders' inspectors would discuss changes at a technical level.

Euro zone officials have told Reuters the plan for the new bailout, meant to extend Greece's year-old 110-billion-euro deal and fund it into late 2014, would feature up to 60 billion euros of fresh official loans, 30 billion euros from the private sector and 30 billion euros from privatizations.

Leading global credit ratings agencies have warned, however, that changes to terms of existing government bonds could be considered as a default. ($1 = 0.698 Euros)

(Additional reporting by Renee Maltezou, Lefteris Papadimas in Athens, John O'Donnell in Brussels and Faith Hung in Taipei; Writing by Barry Moody and Tomasz Janowski; Editing by Kim Coghill)