The banking problems that wrecked Ireland’s public finances, prompting an international bailout, have been largely contained, and the economy is projected to expand this year for the first time since 2007.

But this tentative turnaround is now at risk from the rest of Europe, where an economic slowdown and political wrangling over how to address the continent’s debt crisis threaten to undermine Ireland’s hard work.

Economic analysts are holding up Ireland as a model of how countries in a banking crisis should tackle their financial firms — putting some out of business, injecting money into others, and moving with haste. The IMF and the United States have urged that other countries in the euro currency zone adopt an equally thorough and aggressive approach.

So, too, the Irish government has moved swiftly to balance its books while others have tarried. Ireland is expected to meet targets for its budget deficit this year and next.

Ireland, however, also offers a cautionary tale for other victims of Europe’s debt crisis, illustrating how long it can take to recover and the hazards along the way.

The country’s success depends on the uncertain economic health of its European neighbors, which are crucial customers for Irish exports, and on the ability of other cash-strapped European countries to put their own finances in order. Bad economic news from another country can be bad news for Ireland. Investors remain mistrustful of euro-zone countries as a whole, threatening to confront Ireland with prohibitively high interest rates next year when it’s scheduled to begin borrowing again on international markets.

The International Monetary Fund on Wednesday cut its growth projections for Ireland to reflect an expected decline in exports, especially to Europe and the United States. Moreover, the IMF said, the outlook for Ireland remains “clouded,” largely because of the “perceived lack of coordination at the wider euro area level.”

New economic problems in Ireland, in turn, could further undermine faith in the euro area. And British banks, which have large holdings in Ireland, could also take a hit, posing a threat to a variety of global financial companies that do business with them.

Ireland is being supported by a three-year, $123 billion emergency program put in place in December. Judged in isolation, the plans prepared by the IMF, the European Union and Irish authorities seem to be working.

A steep cost

The country’s core problem — banks strangled by bad loans when a real estate bubble burst — is being resolved, according to IMF and other studies. Financial firms that were too far gone, the Anglo Irish Bank, for example, were put out of business. The ones that remain have been restructured and given fresh injections of capital by the government.

The cost has been steep. Ireland’s blanket commitment to protect its banks threatened the government with insolvency and forced it to seek IMF and European help.

The follow-up process involved strict tests to see how much new capital the banks needed and the creation of a publicly funded “bad asset” company to take the worst loans off their books. The four remaining major banks have been forced to set aside unusually large sums of money to protect against bad loans, develop plans to shrink by tens of billions of dollars in coming months and return to the more conservative practice of relying mostly on savings deposits — rather than large loans from investors — as a source of credit for businesses and homeowners.

The United States and IMF have urged other European countries to give their banks similar medicine. Banks elsewhere on the continent have been reluctant to write off bad debts, put bankrupt companies out of business, raise new capital and confront possible losses on government bonds.

Ireland was “spiritually closer to the U.S. and U.K. model of speed and transparency,” in tackling its bank problems, said Jonathan McMahon, director of Credit Institutions Supervision for the Central Bank of Ireland. McMahon said the Irish assumed that any partial effort to fix the banks would fail to win the confidence of global investors. A weak program, he said, would be a “disaster.”

Beneficial efforts

Public sector payrolls, meantime, were trimmed with salary cuts and hiring limits, and the retirement age was increased.

Ireland has also benefited as its labor force has become more competitive, the result of wages remaining stagnant while they’ve continued to climb in some neighboring countries.

And a strong export sector, including major international pharmaceutical and technology companies lured by the country’s low tax rate, took advantage of recent growth in Asia and the slight recovery in the United States and Europe. Foreign investment is up sharply, and firms such as PayPal and gaming company PopCap are expanding, using Ireland as a base for research and multilingual customer service operations for all of Europe.

Seattle-based PopCap, whose Bejeweled game is a staple on cellphones, set up an office here six years ago. Since then, the staff has doubled to 80. “There’s a recognition that gaming as an industry is important to Ireland,” said general manager Paul Breslin. “There is more employment, and it is easier to find staff.”

Barry O’Leary, head of Ireland’s Investment and Development Agency, said the expansion in tech employment and the recent jump in exports have been among the few things offsetting the collapse of construction in employment and an ongoing downturn in household spending.

“We’ve had a steady, continuous flow” of new investment, O’Leary said. But, he added, “it’s nothing we can take for granted.” In efforts to recruit companies, “the uncertainty is not good.”

Confidence is an issue for Irish companies and Irish bonds.

When Greece fell behind in carrying out the terms of its IMF rescue program, requiring a new and expanded bailout this year, the view of Dublin’s credit standing among investors decayed along with that of Athens.

Ireland’s creditors are also concerned that they could be forced to take losses — much as Greek bondholders have been asked — although European leaders insist that Greece is a unique case.