WASHINGTONIn the last few years, an abundance of consumer demand, credit and investment coming from the rich nations combined to pull millions out of poverty worldwide. Because the bubble-induced international conditions showered every corner of the planet, it was unpopular to point out that some countries were still in need of major reforms and would not continue to prosper indefinitely.

Now that the feast is over and the day of reckoning is here, one way to sort the chaff from the wheat is to look at the 2009 Institutional Quality Index, authored by economist Martin Krause for the International Policy Network. It ranks countries according to how much economic freedom, democracy and rule of law they provide. Since countries with higher scores have attracted more funds and capital than those with lower scores in recent years, the latter will likely be in deep trouble for years to come due to the changed international conditions.

In 2007, net capital flows amounted to $929 billion in emerging countries; this year the figure will be a mere $165 billion. It sounds comical, but poor countries in the last couple of years have been lending more money to rich countries than the other way around. The drying up of international funding and investment will make competition ferocious for whatever money is available; only nations that improved their institutions when few were asking questions will get those dollars.

Having good institutions does not simply mean having an open economy. It means underpinning the open economy with the rule of lawthat is, strong legal protections for persons and property. In fact, the rule of law is so crucial that countries with relatively big and bureaucratic governments oftentimes do better than those with more open economies but more precarious legal safeguards. This is why Latin America ranks behind Central Europe and Asia, or why Uruguay and Costa Rica are ranked much higher than Mexico and Peru, where economies are more open but the rule of law is weaker.

Cultural legacies may help explain the tendency of areas such as Central Europe (pre-communism) and those Caribbean islands with common law traditions (British colonialism) to outperform others. And historical reasons may account for the fact that Chile, where institutional stability was greater in the 19th century, tends to do better than its neighbors even when reform stalls. In any case, the evidence tells us that the countries with a greater combination of economic freedom and rule of law are going to be much more attractive in this post-bubble scenario characterized by very scarce international funding and investment.

Southeast Asia, Central Europe and Latin America are much better placed than, say, the Balkan nations or Eastern European laggards such as Russia, Ukraine and Belarus. But there are big differences within each region. The slowing down of what had been an impressive wave of reform in Vietnam and Hungary in recent years has made those countries more vulnerable than Malaysia and Slovakia to the international conditions likely to prevail in the next few years.

There is nothing predetermined about a countrys destiny: 632 million Chinese and 117 million Indians who overcame dire poverty in the last two decades attest to that. But governments that did not reform their institutions in times of plenty are now going to face popular pressure to redistribute wealth and bend or trample the law in order to meet social claims. The outcome will be even weaker institutions in those countries.

By all indications, Russia, Turkey, Argentina, Venezuela, Indonesia and Nigeria, to name but a few that profited from the commodities boom, will see their institutional flaws crudely exposedand their populations will suffer. By contrast, those such as Peru, Colombia, Slovenia, Qatar, Botswana, Mauritius and Kuwait in which markets and the rule of law made progress, in some cases much more than in others, will probably outpace many of their neighbors.

The real stake for developing nations today is not so much the drying up of funding and investment but the winnowing and sifting process that is making clear which societies were living in the real world while others were simply dreaming. The result will be the restoration of the link between institutions and economic growth that the bubble had temporarily severed.