Just a few months ago, Vietnam was touted as the new China, with its fast-growing economy drawing billions of dollars in foreign investment. But then came an inflation problem that seems to have gotten out of control. Now the government is wrestling with a slew of problems that threaten to knock the country's economic success off the rails. Matt Steinglass reports from Hanoi.

Business was brisk Friday morning at the Ngoc Son gold shop in Hanoi, as some customers sold gold necklaces for cash, while others bought gold as a hedge against inflation.

Vietnam's inflation rate topped 25 percent, with food prices rising 22 percent in May alone. Bui Thi Van, who sells beef at a Hanoi street market, says consumers are cutting back.

Van says customers who used to buy two kilograms of beef now buy just one. Her income has shrunk from $250 a month to under $200.

Declining incomes are something Vietnamese had grown unused to. Since 2000, Vietnam's economic growth has averaged over seven percent a year.

Eager foreign investors saw the country as the next China, and began pouring in investment. But as economist Jonathan Pincus of the United Nations Development Program explains, that investment had a downside.

"We're in a situation now, and have been, where we have very big capital inflows financing a big trade deficit," he said.

Vietnam's trade deficit shot up to $14 billion in the first five months of 2008, from $11 billion for all of last year. The influx of foreign currency puts pressure on the Vietnamese dong to strengthen.

But that would make Vietnamese exports more expensive, hurting local industries. So the government held down the exchange rate by buying dollars with dong, which inflated the supply of dong, contributing to inflation.

The global rise in oil and food prices has also worsened inflation in Vietnam. And, says Adam McCarty, of analysis firm Mekong Economics, so did an explosion of credit from banks looking to profit from the boom.

"What we're talking about here is mainly the smaller and newer joint stock banks that were opened up in the last few years, that got heavily involved in real estate and the stock exchange, and they expanded their credit by over 100 percent in 2007, so they're all exploding," said McCarty.

To fight credit growth, the government has tightened credit rules and raised interest rates, but that risks making some over-extended banks fail. To top it off, Vietnam's stock market, among the world's best performers in early 2007, has been among the worst this year, plunging over 50 percent.

By late May, Vietnamese and foreigners were losing confidence in the currency, forcing the government to devalue the dong by two percent this week, and to raise the prime interest rate to 14 percent from 12 percent.

Peter Ryder, head of the investment group Indochina Capital, says that reassured investors, but perhaps not enough.

"The big, big issue in my mind is, are they going to be able to get away with just gradually devaluing the currency, is that the best thing to do? Or should they just kind of go 'whack'? Just do [devalue by] 20 percent at one time? Or are they just going to kind of let the air out of the tire [slowly devalue the currency]?"

Analysts at the investment banks Merrill Lynch, Deutsche Bank, and Morgan Stanley have warned that unless the government raises interest rates, devalues the dong, shuts down insolvent banks, and cuts government spending, it could face a currency crisis.

McCarty at Mekong Economics calls a crisis unlikely, but possible.

"The worst scenario is they don't make more of these tough decisions, and then they fail to be able to defend the exchange rate, and they run out of foreign exchange, and then you have a foreign exchange crisis like Thailand in '97, which if that happened would happen later this year," continued McCarty.

The UNDP's Pincus says such alarmist scenarios should be taken with a grain of salt.

"When people are thinking about the capital inflows, they think, well, the currency should be appreciating because of all this money flowing in," said Pincus. "And then when they start thinking about the trade deficit, they think, well, the currency should be depreciating because of all this money flowing out. It's really a matter of psychology, rather than the fundamentals."

But for Vietnamese who are seeing their incomes and spending power shrink for the first time in over a decade, the effects of market psychology feel very real indeed.