Although the crisis that is currently playing itself out in Greece may seem novel to many observers of developed markets, it follows, in many ways, a well-worn script of capital account liberalization followed by crisis, one that has been seen many times in emerging markets. In fact, that crises almost inevitably follow major capital account liberalization episodes is somewhat accepted as a stylized fact in international finance. Think of the Latin American debt crisis of the early 1980s, which came after many of them opened their capital accounts in the mid-1970s. Think of the gyrations in Russia in 1998, after substantial capital market reforms in 1997. And, most recently, think of Eastern European nations such as Croatia, the Czech Republic, Hungary, and Romania, who made significant moves toward greater capital market integration with western Europe, starting with the advent of the euro in 2000.
In fact, of the 189 major capital account liberalization episodes between 1970 and 2007, at least 154---slightly more than four-fifths---have ended up with some financial crisis or other within the subsequent four years (see figure). Of course, this depends on the extent of liberalization (as well as the length of time elapsed since the event), but it is fairly clear that larger moves toward greater capital account openness are generally followed by a crisis.
Notes: Liberalization episodes variously identified when change in the Chinn-Ito index exceeds 1, 1.5, and 2. Financial crises included banking, currency, (domestic and foreign) debt, and inflation crises, and were recorded for the contemporaneous year where the liberalization episode occurred, plus a lead of up to four years.
The mechanism behind this will, of course, differ according to the country in question, along with the macroeconomic framework that is operative in that country. But the process typically begins with a large inflow of foreign capital, usually in the form of portfolio investment. More often than not, this strains the absorptive capacity of the receiving economy; economies that are less able to do so often end up deploying capital into nonproductive (or at best less productive) sectors, the prime culprit being real estate, but the local stock market could just as likely be the sponge. As we are well aware, such asset price bubbles can persist for longer than we expect. Eventually, however, there is a sharp capital account reversal---perhaps triggered by a seemingly small, insignificant event---and the rapid capital outflow leads to unsustainable pressures on countries with fixed exchange rates (inducing a currency crisis when the peg is eventually abandoned). Existing currency mismatches compound maturity mismatches, and the deterioration of bank balance sheets leads to an accompanying banking crisis. If countries had chosen an interest rate defense of their currencies, these high rates would themselves exacerbate the weak balance sheets of domestic banks.[*]
A similar story describes the Greek situation, along with that of EuroMed economies such as Portugal and Spain. Participation in the eurozone effectively meant dramatic capital account liberalization for these countries vis-a-vis each other. It also meant that these economies experienced a reduction in real interest rates, as borrowing costs converged toward levels similar to those of the stronger core European members. Recall, this was not only desirable on its face; indeed, the ability to "import" credibility from the Bundesbank was one of the purported advantages  of monetary llunification, at least from the perspective of the periphery countries. Be that as it may, readily available financing does not necessarily translate into productive investment. There is ample anecdotal evidence  that the population took advantage of low rates to finance durable and nondurable consumption.
Now that creditors are unwilling to continue extending credit, Greece is experiencing a crisis. To restore the competitiveness of the Greek economy, the real exchange rate needs to fall. Of course, being on the euro means that depreciation is not an available policy lever to bring about this decline (short of an outright exit). Hence deflation, and hence angry riots in the streets. Thankfully, the Greeks were able to borrow in euros, which means that the banking sector does not face a currency mismatch. The economic future facing these heavily-indebted EuroMed economies is a Morton's fork of avoiding a financial crisis or outright deflation.
What lessons are there for developing economies? Foremost is the caution of equating trade liberalization---and the benefits that accrue from such liberalization---and that of financial liberalization. This is an old myth , first punctured in the aftermath of the Asian financial crisis by Jagdish Bhagwati . While factor reallocations resulting from trade in goods undoubtedly lead to dislocations and clear losers , the volatility induced by such disruptions appear to be far less than those that are brought on by a financial crisis. Blind deregulation of the financial sector should thus be avoided. Even if a country chooses to open its capital account, prudence would dictate that it does so gradually, so that the more lumbering real economy can adjust to the new opportunities afforded by increased access to international finance. Finally, the selective use  (PDF) of capital controls in a broad policy mix may be useful in helping moderate surges in portfolio inflows, especially when they are directed toward debt rather than equity.
*. Of course, causality can also run from a banking crisis to a currency crisis. If so, a collapsing banking system increases the pressure for the central bank to bail out the banks; this precipitates a currency crisis when the increased liquidity provided is inflationary, and erodes the value of the domestic currency.