RIO DE JANEIRO — Pondering the financial storms lashing Europe and the United States, Seth Zalkin, a casually dressed American banker, sipped a demitasse and seemed content with his decision to move here in March with his wife and son.

“If the rest of the world is cratering, this is a good place to be,” said Mr. Zalkin, 39.

For those with even the dimmest memories of Brazil’s own debt crisis in the 1980s, the global order has been turned on its head. The American economy may be crawling along, but Brazil’s grew at its fastest clip in more than two decades last year and unemployment is at historic lows, part of the nation’s transformation from inflationary basket case into one of Washington’s top creditors.

With compensation rivaling that on Wall Street, so many foreign bankers, hedge fund managers, oil executives, lawyers and engineers have moved here that prices for prime office space surpassed those in New York this year, making Rio the costliest city in the Americas to lease it, according to the real estate company Cushman & Wakefield.

A gold rush mind-set is in full swing, with foreign work permits surging 144 percent in the past five years and Americans leading the pack of educated professionals putting down stakes.