The following commentary was originally posted on FoolFunds.com, the website of Motley Fool Asset Management, LLC, on Jan. 31. With permission, we're reproducing it here in its original form.

In the last two years Indonesia has been an investment darling, with its shares increasing 46% in 2010 alone, tops among the world's largest markets. Unlike many of its Asian neighbors, Indonesia lacks an export-driven economy or a massive global diaspora. It makes for a country that seems much smaller than it is.

Our driver coming in from the airport was the first to ask. He wouldn't be the last.

"When was the last time you were in Jakarta?"

"1998."

"Wow. You were here in 1998? That was a crazy time. We're glad you've come back." Several Indonesians seemed genuinely impressed that I'd been in country during such a transformational period. Now, 13 years later, my colleague Tony Arsta and I were back, seeking investment opportunity in Indonesia, a country and a market quite different than the one I'd left.

In 1998 Indonesia had nearly, violently, come apart at the seams. From my hotel room in Jakarta, its sprawling capital, I could see massive fires and huge demonstrations against the government. After 30 years under a corrupt autocracy, the people decided they'd had enough. It was uncertain whether Indonesia would continue to exist.

As a nation, Indonesia is a statistical improbability. At 237 million people, Indonesia is the fourth most populous country worldwide, double the size of Japan, triple Germany. It comprises 17,000 islands, nearly 1,000 of which have permanent inhabitants. Traveling within the country can mean occasionally flying deathtrap airlines (45 Indonesian airlines are blacklisted by the European Union), boarding overcrowded ferries, or stewing on overcrowded roads.

Indonesia's citizens speak some 700 languages and are culturally disparate, from deeply conservative Acehnese in west Sumatra to penis gourd-wearing Melanesians in New Guinea. The distance from one end of the country to the other is greater than Boston to Los Angeles. Jakarta, the site of multiple bombings by Islamic terrorists over the last decade, is at the same time almost incomprehensibly decadent. One club near our hotel features a rave party that runs nonstop from Thursday evening to Monday morning. If you can't find a vice in Jakarta, you probably can't find it anywhere.

Grinding poverty coexists with extreme opulence, occasionally on the same block. Indonesia also has the second largest number of Facebook members in the world.

But for such a large country, Indonesia's global footprint is relatively modest. Perhaps this is due to its remote location, or to the relative lack of an Indonesian diaspora (there are 63,000 Indonesian Americans, versus, by semi-random example, 3 million Lebanese Americans, 1 million Nigerian Americans and 200,000 Hmong Americans).

What's more, unlike most large Asian countries, more than half of Indonesia's GDP is driven by domestic consumption.

Indonesians have largely elected to remain at home. Many people would be hard pressed to come up with a list of internationally influential Indonesians. I got Eddie and Alex Van Halen, and then after that … nothing. The fact is, on the global stage, Indonesia punches substantially below its weight.

(I'll wait here while you go look up the Van Halen reference. Crazy, huh?)

Being an inwardly-focused economy has some advantage. In 2009, while export-dependent countries in its region suffered recessions and sagging GDPs, Indonesia grew 4.5%. Consensus growth estimates for the country for 2010 are about 6%. The downside is that Indonesia may be more susceptible to money flows than any of its neighbors.

We came to Indonesia looking for undervalued companies. We found … some. We certainly weren't early. In 2010 the Jakarta Stock Exchange Composite Index was the top performer in Asia in 2010, up 46%. This is on top of an 88% gain in 2009. Certainly the Indonesian market's returns have been juiced by investors fleeing troubled European markets, as well by as the tightening of capital controls in China.

These sorts of market boosts tend to be temporary. Of more permanent significance Indonesia has enacted market, legal, banking and regulatory reforms over the last decade, and has developed a stable -- if flawed -- democracy. Add in the skyrocketing purchasing power of its 30 million person middle class, and Indonesia is a country that's gussied itself up to the point that discerning investors should increasingly be willing to leave capital there for a long time.

We are generally deeply impressed with the quality of the managers we met, as well as the quality of information their companies disseminate. In short, Indonesia has recast itself from fling-worthy to marriage material. Several international economists expect that Indonesian government debt is due to be upgraded to investment grade by ratings agencies. Indonesia was the only country in the G20 that had a declining debt-to-GDP ratio in 2009.

This doesn't mean that Indonesia has joined the ranks of world's safest stock markets. Governance challenges of such dispersed geography are immense, and both corruption and sclerosis-inducing red tape still exist on a grand scale. One old hand whom I met with described the environment thus: "There are a few companies in Indonesia that are of the highest quality in the world. The rest are garbage."

We saw a little bit of both, but some Indonesian companies like Sumber Alfaria Trijaya -- which is opening small-scale grocery stores in the country at a clip of four per day -- and Kalbe Farma, the largest pharmaceutical company in Southeast Asia, were indeed world-class companies with extremely accomplished managers and boards of directors.

The good news about Indonesia is that I think it stands ready to become one of the world's economic powerhouses. In the last two years, foreign investor money has poured into the country, causing considerable asset appreciation.  At some point this virtuous trend will turn vicious, and in these times considerable bargains tend to reveal themselves to the patient.

Already as December turned to January, Indonesian stocks suddenly dropped more than 10%, as foreign investors fear the spectre of inflation. Indonesia's transformation from sleepy economic backwater to powerhouse won't be smooth, but the opportunities will remain immense.

Foolish best-

Bill Mann

For further reading, I suggest:

In the Time of Madness: Indonesia on the Edge of Chaos, Richard Lloyd Parry

The Year of Living Dangerously, Christopher Koch

Nathaniel's Nutmeg, Giles Milton

Best Local News Source: Jakarta Post (English language)

Distinctly Indonesian Experience: Drinking coffee at Warung Tinggi

Under the radar Indonesian restaurant: Nasi Uduk Kebong Kacang, Jakarta

Editor's note: Bill Mann is not able to engage in discussion on the boards or in the below comments section. Bill does not own shares of any companies mentioned.