Greece committed itself to years of painful sacrifices to secure a massive European Union and IMF financial bailout on Sunday, and Germany's chancellor finally threw her full support behind the rescue.

Euro zone finance ministers met in emergency session to approve an aid package expected to total just under 120 billion euros ($160 billion) over three years, ahead of a May 19 deadline for Athens to make a big debt repayment to its creditors.

In exchange for by far the largest bailout ever assembled for a country, Prime Minister George Papandreou announced further spending cuts and tax increases totaling 30 billion euros over three years on top of tough measures already taken.

It is an unprecedented support package for an unprecedented effort by the Greek people, a somber Papandreou told a televised cabinet meeting.

German Chancellor Angela Merkel called the programme very ambitious and designed for the long term and said she would work to achieve swift parliamentary approval of Berlin's contribution to the rescue loans.

I'm going to work for the Greece programme and its passage, she told reporters in Bonn. Polls show German voters strongly oppose any handouts for Athens.

Greeks have already taken to the streets to demonstrate against the austerity drive and past governments have backed off from reforms to defuse often violent protests. But Papandreou, a Socialist with a strong personal approval rating, has insisted the country must face the bill for years of drift and graft.

These sacrifices will give us breathing space and the time we need to make great changes, he said. I want to tell Greeks very honestly that we have a big trial ahead of us.

The first rescue of a member of the 16-nation euro zone aims to stem a debt crisis that has shaken financial markets worldwide and spread to fellow euro zone weaklings Portugal and Spain. Berlin's hesitancy so far has fueled market panic.

Telling angry Greeks to choose between the painful rescue or economic collapse, the government now aims to bring its towering budget deficit back to the EU limit by 2014, two years later than originally promised.

These measures are tough and unfair, said Stathis Anestis, a spokesman for private sector union GSEE. They lead workers to misery and the country deeper into recession.

Economists were more positive. The aid package will help defuse the primary cause of concern for creditors which is the imminent risk of default, said Lena Komileva, head of G7 market economics at Tullett Prebon. But she noted that there was still a question mark over political approval across Europe.

Underlining the challenge facing Merkel, German politicians warned that any blessing would come with strings attached. Economy Minister Rainer Bruederle said the cabinet would closely examine the agreement on Monday before deciding whether Berlin would contribute to the bailout.

A conservative ally of the chancellor demanded extra conditions, including sending a European Commissioner to oversee spending cuts and accounting. We can't give Greece any blank cheques, said North Rhine-Westphalia state premier Juergen Ruettgers, who faces election defeat next Sunday.

Luxembourg's finance minister said the aid package was likely to be in the range of 120 billion euros but a euro zone source familiar with the figures said it would be slightly less.

This would dwarf the previous record bailout. South Korea -- a country with a population nearly five times that of Greece -- obtained a $58 billion rescue package from donors including the IMF during the Asian financial crisis in 1997.

Euro zone government heads also need to give their blessing, likely at a summit on Friday or Saturday. Parliaments of some member nations must also give their approval.

Diplomats said they expected the emergency funding to be unblocked by the second half of the following week, beginning May 10. Athens has to repay 8.5 billion euros of debt on May 19.

COLLAPSE OR SALVATION

Declaring Greece faced a choice between collapse or salvation, Finance Minister George Papaconstantinou announced a three-year public sector pay freeze, further cuts in civil servants' benefits, higher sales and fuel taxes, an increase in the effective retirement age and reductions in pensions.

Papaconstantinou said the deal would cover a large part of Greek borrowing needs for the next three years. In return Athens promised to slash its budget deficit to the EU limit of three percent of GDP by 2014 from 13.6 percent last year.

A fund backed by the IMF and EU would be set up to help Greek banks.

Papaconstantinou said Greece's public debt would soar to nearly 150 percent of GDP -- a higher peak than forecast earlier -- but start falling from 2014. Athens would return to commercial borrowing when appropriate, he added.

The German government, which is to contribute 8.4 billion euros in the first year, says it will try to push the necessary law through the lower house of its parliament by this Friday.

Economists say that if the rescue fails to calm markets, European countries could end up footing a bill of half a trillion euros ($650 billion) to save several other nations.

(Writing by Noah Barkin/David Stamp/Paul Taylor; editing by Janet McBride)