Hardship has long been common here — and still is. But in just four years, the country has gone from the European Union’s worst economic disaster zone to a model of what the International Monetary Fund hails as the healing properties of deep budget cuts. Latvia’s economy, after shriveling by more than 20 percent from its peak, grew by about 5 percent last year, making it the best performer in the 27-nation European Union. Its budget deficit is down sharply and exports are soaring.

“We are here to celebrate your achievements,” Christine Lagarde, the chief of the International Monetary Fund, told a conference in Riga, the capital, this past summer. The fund, which along with the European Union financed a bailout of 7.5 billion euros for the country at the end of 2008, is “proud to have been part of Latvia’s success story,” she said.

When Latvia’s economy first crumbled, it wrestled with many of the same problems faced since by other troubled European nations: a growing hole in government finances, a banking crisis, falling competitiveness and big debts — though most of these were private rather than public as in Greece.

Now its abrupt turn for the better has put a spotlight on a ticklish question for those who look to orthodox economics for a solution to Europe’s wider economic woes: Instead of obeying any universal laws of economic gravity, do different people respond differently to the same forces?