* Ireland is second euro country to receive emergency aid
* EU agrees on outlines of permanent crisis mechanism
* Private bondholders may take debt writedown post-2013
* Ministers hope package will halt debt crisis contagion
(Adds Cowen, Schaeuble quotes, detail on mechanism, Trichet)
By Jan Strupczewski and Julien Toyer
BRUSSELS, Nov 28 (Reuters) - The EU approved an 85 billion euro ($115 billion) rescue for Ireland on Sunday and outlined a permanent system to resolve Europe's debt crisis, in which investors could gradually share the cost of any future default.
Finance ministers from the 16-nation euro zone, anxious to prevent market contagion engulfing Portugal and Spain, unanimously endorsed an emergency loan package to help Dublin cover bad bank debts and bridge a huge budget deficit.
"This agreement is necessary for our country and our people. The final agreed programme represents the best available deal for Ireland," Irish Prime Minister Brian Cowen said.
Some 35 billion euros was earmarked to help restructure the shattered Irish banks, of which 10 billion will be an immediate capital injection and the rest a contingency fund. Ireland will contribute 17.5 billion euros of its own cash and pension reserves towards the bank rescue.
The rest of the emergency loans, which Dublin said were granted at an average interest rate of 5.8 percent, will help cover the giant hole the banks have blown in public finances. The IMF will contribute 22.5 billion euros. [ID:nWLA9299]
EU Monetary Affairs Commissioner Olli Rehn said the final interest rate would only be decided next week but put the likely average at about 6 percent. [ID:nWEA2085]
The loans will run for an average of 7.5 years, Ireland said, and the EU quietly agreed to extend the maturities on Greece's three-year rescue package to the same date.
In a key concession, Ireland was given an extra year, until 2015, to bring its budget deficit down to the EU limit of 3 percent of gross domestic product, based on a more cautious annual GDP growth estimate than the government's 2.75 percent.
Cowen, whose unpopular government is close to collapse over the EU/IMF bailout, said the deal did not involve any change to Ireland's jealously-guarded 12.5 percent corporate tax rate. [ID:nWLA9302]
The loans, disbursed subject to strict quarterly EU/IMF monitoring, will allow Ireland to borrow at cheaper rates than it could obtain on capital markets, where its borrowing costs have soared to about 9 percent, he said.
For an interactive timeline on the Eurozone debt crisis in 2010, click on link.reuters.com/nyx95q
For Take a Look, click [ID:nLDE68T0MG]
For multimedia coverage on the Euro Zone Crisis page on Top News: r.reuters.com/hus75h
For a graphic on countries debt problems, click on r.reuters.com/zem66q ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^>
Under pressure to take dramatic action to arrest a systemic threat to the euro before markets opened, the 27 EU finance ministers approved the broad outlines of a permanent crisis-resolution mechanism, to be called the European Stability Mechanism, based on a joint proposal by Germany and France.
Crucially, private bondholders could be made to share the burden of restructuring of a euro zone country's sovereign debt bought after 2013, subject to a case-by-case evaluation without any automaticity, Rehn said.
International Monetary Fund procedures would apply, he said. The IMF's "lending into arrears" policy stipulates that the Fund will lend to a country that is making good-faith efforts to come to an agreement with bondholders.
The IMF favours so-called Collective Action Clauses in sovereign bonds, enabling a majority of bondholders to impose restructuring on others. Rehn said CACs would apply on euro area sovereign bonds from mid-2013.
The lack of detail in an earlier Franco-German deal on a permanent crisis mechanism, agreed last month, and talk of private investors having to take losses, or "haircuts", on the value of sovereign bonds, helped drive Ireland over the cliff.
With anxiety rattling bond markets, the Irish government was under intense pressure to accept a bailout despite repeatedly saying in recent weeks that it did not need one.
European leaders are hoping that the support package for Ireland, drawn from a 750 billion euro rescue fund agreed by the EU in May this year, will convince markets that the crisis can be contained and spare Portugal and Spain.
"It is a good decision, and it makes it clear to our taxpayers that we have kept our word," said Finance Minister Wolfgang Schaeuble of Germany, Europe's biggest economy, where voters strongly opposed the earlier bailout for Greece.
The euro EUR= rose slightly against the dollar in early Asian trading but economists in Europe said they did not think the deal for Ireland and the longer-term arrangements would stop market pressure on the euro zone immediately.
"I don't think this is going to be a silver bullet. I think there is still going to be some question marks on Portugal and Spain," said Peter Westaway, chief economist at brokers Nomura.
Portugal finally approved a 2011 austerity budget last Friday and vowed early implementation of savings measures, while Spain announced on Saturday it would bring forward pension reform and speed up mergers of its troubled savings banks, the cajas, weighed down by bad debts after a housing bubble burst.
Debt worries have driven the crisis for the past year, severely denting confidence in the 12-year-old euro currency and producing what amounts to a showdown between European politicians and financial markets.
Tens of thousands of Irish took to the streets of Dublin on Saturday to protest against the looming bailout. Opposition parties said they would not accept excessive rates of interest.
The parties, Fine Gael and Labour, are expected to rout Cowen's Fianna Fail party in an election within months. They have said they would be bound by a rescue deal but may try to renegotiate details.
Both want bond investors who lent money to Irish banks to take on a bigger share of their country's bailout burden, rather than foisting it all on Irish taxpayers. But Cowen said the EU had opposed making senior bank bondholders take writedowns because of the impact on the European financial system.
The European Central Bank gave its blessing to the Irish programme in a statement but made no mention of the crisis resolution mechanism. ECB President Jean-Claude Trichet said in Brussels the important thing was that the IMF's doctrine would apply, the EU would not get involved in debt restructuring itself and bondholders would not be affected retroactively.
Jitters sent the shares of European banks which hold the debt of Irish banks tumbling on Friday. The euro also fell to a two-month low against the dollar and the borrowing costs of Ireland, Portugal and Spain stood near record highs.
European officials have been at pains to play down the links between Ireland and Portugal, widely seen as the next euro zone "domino" at risk. Troubles in Portugal could spread quickly to its larger neighbour Spain because of their close economic ties. (Additional reporting by Luke Baker, Timothy Heritage and Bate Felix in Brussels, Carmel Crimmins, Lorraine Turner and Padraic Halpin in Dublin, Sakari Suoninen in Frankfurt and Lesley Wroughton in Washington; writing by Paul Taylor; editing by Andrew Roche)