Portugal struck a deal late on Tuesday with the European Union and IMF for a €78 billion ($116 billion) package over three years to rescue the country from its heaving debt, the government announced.
The country is the third eurozone member to accept financial assistance under the EU and IMF bailout program to keep the common European currency afloat.
Caretaker Prime Minister Jose Socrates announced the deal, which will need broad cross-party support in the capital Lisbon because the collapse of Socrates' government last month. This pushed up borrowing rates and ultimately forced Lisbon to ask for the bailout.
A snap election will be held on June 5.
"The government has obtained a good deal. This is a deal that defends Portugal," said Socrates, according to news agency Reuters.
The terms would be less onerous than those set for Greece and Ireland, he said.
Officials from the European Commission, European Central Bank and IMF have been working on a deal for three weeks.
Socrates said in a televised statement that Portugal would be given more time to reach its budget deficit targets than had previously been expected.
The deficit will have to be cut to 5.9 percent of GDP this year, 4.5 percent in 2012 and 3 percent in 2013.
Portugal had previously aimed to reduce the deficit to 4.6 percent this year, 3 percent in 2012 and 2 percent in 2013.
Socrates resigned as prime minister after failing to get austerity measures through parliament. The country’s economy is expected to shrink this year because of the austerity measures.
The question now is whether Portugal will be the last eurozone bailout, or whether the much-bigger Spain will also need help. There are serious doubts about whether the EU can actually afford to bail out Spain.
Even as the Portugal deal is announced, investors are watching Greece’s rescue unravelling, with that country having to write off huge government borrowings.