RIGA, Latvia — When a credit-fueled economic boom turned to bust in this tiny Baltic nation in 2008, Didzis Krumins, who ran a small architectural company, fired his staff one by one and then shut down the business. He watched in dismay as Latvia’s misery deepened under a harsh austerity drive that scythed wages, jobs and state financing for schools and hospitals.

But instead of taking to the streets to protest the cuts, Mr. Krumins, whose newborn child, in the meantime, needed major surgery, bought a tractor and began hauling wood to heating plants that needed fuel. Then, as Latvia’s economy began to pull out of its nose-dive, he returned to architecture and today employs 15 people — five more than he had before. “We have a different mentality here,” he said.

Latvia, feted by fans of austerity as the country-that-can and an example for countries like Greece that can’t, has provided a rare boost to champions of the proposition that pain pays.

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.