Media playback is unsupported on your device Media caption The Greek government has got what it needs, but the Greek people are not so happy with the result

The Greek government has won a critical vote of confidence as it struggles to win support for extra austerity measures and avoid a debt default.

Prime Minister George Papandreou's new cabinet was approved in parliament by 155 votes to 143, with two abstentions.

MPs will now be asked to approve 28bn euros (£25bn) of cuts, tax rises, fiscal reforms and privatisation plans.

Eurozone ministers say the legislation must be passed to receive a 12bn-euro loan Greece needs to pay its debts.

Earlier, thousands of people gathered outside the parliament building in Athens to protest against both the austerity measures and politicians in general. Many chanted: "Thieves! Thieves!"

"There is great indignation that you see around you," one protester told the BBC.

Because Greece chose to give up their currency, they have this "rescue" option which emerging market economies don't get when they run up gargantuan debts. But when Greece opened the door to a bail-out, they also closed several others. On Greece, lobsters and crises

"There is a lot of desperation that is registered on the faces of the people around us. It means there is no future."

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

Mr Papandreou reshuffled his cabinet and replaced his finance minister last week after weeks of demonstrations against his handling of the crisis.

'Moment of truth'

The confidence vote took place early on Wednesday after a heated debate on Tuesday that saw sections of the opposition briefly walk out.

Despite the threat of a revolt within the governing Panhellenic Socialist Movement (Pasok), MPs voted strictly along party lines.

The prime minister earlier acknowledged the austerity measures were tough but said the last thing Greece needed now was an election.

"At this time of pain I want to send a message to all Greeks," he said. "Yes, the course is difficult but there is light at the end of the tunnel.

"We all have to agree that we will put an end to deficits. We want to make a leaner, healthier state, because otherwise our country cannot take the burden."

The assertions were dismissed by some opposition MPs during the debate.

"This is not a programme to salvage the economy, it's a programme for pillage before bankruptcy," Alexis Tsipras of the Left Coalition said.

Mr Papandreou must now persuade parliament to approve a five-year package of 28bn euros of tax increases and spending cuts by 28 June.

It will then have to push through laws implementing the reforms in time for an extraordinary meeting of eurozone finance ministers on 3 July.

On Sunday, the eurozone ministers said they would withhold the payment of the latest tranche of the European Union and International Monetary Fund's 110-bn euro bail-out package until the laws were in place.

Greece needs the loan to be able to keep up with payments to creditors of its 340bn euros of debts, which amounts to 30,000 euros per person.

European Commission President Manuel Barroso warned that Greece faced a "moment of truth" and needed to show it was "genuinely committed to the ambitious package of further fiscal measures and privatisations" needed to avoid a sovereign default.

Analysis And so the Greek government survived its first hurdle - a vote of confidence in parliament. But already thoughts are turning towards its next task. To persuade MPs to pass further austerity measures before the end of this month - they're designed to save billions of euros. Prime Minister George Papandreou said during this debate that the alternative - default on its debts, and a possible exit from the single currency - would be a catastrophe for Greece. And he appealed for the support of the entire country. But he's calling for unity in a divided land. And the demands of international lenders in Europe and elsewhere are straining the political system here to the limit. The president of the European Commission said this was a moment of truth for Greece. But it is just one small step. It would be a mistake to under-estimate the determination of Europe's political leaders to protect the euro. But the impression that the eurozone is stumbling from crisis to crisis - surviving with the liberal use of sticking plasters - has not yet been lifted.

The eurozone ministers also agreed on Sunday to put together a second bailout package worth 120bn euros to fund Greece into late 2014.

The new aid package, to be outlined by early July, will include loans from other eurozone countries. It will also feature a voluntary contribution from private investors, who will be invited to buy up new Greek bonds as old ones mature. Officials said this money had to be freely given, or it would be seen as technical default on Greece's debt repayments.

The objective of Mr Papandreou, the EU and IMF is to reduce the Greek government's borrowing needs and make its debt sustainable.

BBC Europe editor Gavin Hewitt says the package is opposed by the opposition and some members of Mr Papandreou's own party disagree with some of the spending cuts.

And there could be fierce resistance on the streets, with protesters determined to turn the day of the vote into a major day of action.

Many in the financial markets expect that Greece will at some stage fail to repay its debts in full and on time, even if Mr Papandreou manages to maintain the repayments for the immediate future, he adds.

If Greece were to default on its debt - worth 150% of its annual GDP output - it would have to leave the 17-member eurozone and trigger massive losses for European banks that hold Greek debt, including the European Central Bank.