It’s a rare economic story that involves Facebook Inc., God and credit ratings.

Leave it to Indonesia to serve up a saga that speaks volumes about the obstacles facing Southeast Asia’s biggest economy. Although Indonesia doesn’t often make global headlines, one event last week should have received more ink: Moody’s Investors Service returned the country to investment grade for the first time since the Asian financial crisis. It was an overdue recognition of how far Indonesia has progressed in the last 14 years.

Another news item got far more international attention: A civil servant, Alexander Aan, posted “God does not exist” on Facebook. He was beaten by a mob and faces as long as five years in prison. Atheism is illegal in Indonesia, a predominantly Muslim nation of 240 million.

The real story is misdirected anger. One guy with a laptop and a Facebook account ginned up more outrage than the public manages to direct at corrupt government officials who enrich themselves while more than 100 million Indonesians survive on $2 a day. That’s the real affront, and it’s a reminder of what’s at stake.

Incidents such as the attack on Aan serve as a distraction from the broader Indonesia turnaround story. As the U.S. and France smart over losing their AAA ratings, Indonesia is quietly moving in the other direction. Standard & Poor’s still rates it as junk, but it’s just a matter of time before S&P follows Moody’s lead.

The Short List

By 2030, Indonesia will be the world’s sixth-biggest economy, surpassing Germany, Mexico, France and the U.K., according to Tai Hui, head of Southeast Asian research at Standard Chartered Plc. It’s on Goldman Sachs Group Inc.’s short list to join Brazil, Russia, India and China as a “BRIC” nation. BRIICs?

The trouble with such optimism, though, is that it doesn’t take account of the serious obstacles to Indonesia’ ascent. Two are worth exploring: China and a sense of fatigue with reforms aimed at fighting endemic corruption.

On a recent trip to Jakarta, Indonesia’s capital, where I met with policy makers, business people and economists, a question kept popping into my mind: OK, now what? The widely held concern is about complacency, of Indonesia beginning to believe the hype about its unstoppable trajectory and not acting to realize it.

Much of the credit for Indonesia’s 6.5 percent growth goes to political stability. Since 2004, President Susilo Bambang Yudhoyono has reduced debt, negotiated a trade agreement with Japan and solidified the democracy that replaced a corrupt dictatorship. A torrent of money flowed to Indonesia in 2011, when foreign direct investment surged 21 percent.

But the caveats are important. Indonesia’s economy is less open than Singapore’s or South Korea’s. Much of the economy is based on domestic sales of coal, metals, palm oil and timber. Those goods it does export often go to China, which is emerging as the big wild card in the Indonesia equation.

We can add Nouriel Roubini to the list of those betting on a significant slowdown for the world’s second-biggest economy. “Export growth is slowing,” the co-founder of Roubini Global Economics LLC told Bloomberg TV on Jan. 20. “If they don’t do something -- stimulus in monetary and fiscal credit -- the risk is that the growth will slow down well below 8 percent.”

Significant Blow

That may not sound so bad, considering China’s gross domestic product expanded 9.2 percent last year. But given the fast-widening gap between rich and poor in China, the worsening global outlook and the general lack of growth engines, a Chinese deceleration would be a significant blow.

The bigger issue is Indonesia’s long and tricky to-do list. Along with improved economic fundamentals, Yudhoyono’s team fought corruption and cracked down on radicalism in the nation with the largest Muslim population. At best, though, Yudhoyono has made a small dent in the vast kleptocracy that’s a holdover from dictator Suharto’s 32-year rule, from 1968 to 1998.

Infrastructure is a major hurdle, one more related to graft than is often acknowledged. Recent upgrades will reinvigorate Yudhoyono’s push to double spending on roads, ports and airports to $140 billion by the end of 2014. The question is how many of those billions will go into the pockets of corrupt officials. At the moment, assume many.

Only when Indonesia creates strong institutions -- a more independent judiciary, greater accountability among public officials, a more aggressive agency to investigate and root out graft -- will big infrastructure projects do their part to generate growth and reduce poverty. This challenge shows how corruption really is at the heart of so much of what ails Indonesia.

The public needs to do its part. Indonesian demand for cleaner government is the key to raising the nation’s ranking in Transparency International’s corruption perceptions index. In 2011, it came in 100th out of 183 economies, tied with Argentina, Burkina Faso and Mexico. Granted, that’s a big improvement from 2004, when Indonesia ranked 133rd along with Democratic Republic of Congo, Georgia and Tajikistan. Yet to get into the ranks of the world’s top 10 economies within two decades, Indonesia must do better.

The return to investment-grade status is a fresh start for Indonesia. It’s now up to officials in Jakarta to do something with it.

(William Pesek is a Bloomberg View columnist. The opinions expressed are his own.)

Read more opinion online from Bloomberg View.

To contact the writer of this article: William Pesek in Tokyo at wpesek@bloomberg.net.

To contact the editor responsible for this article: James Greiff at jgreiff@bloomberg.net.