Brazilian President Dilma Rousseff at a ceremony in Brasilia on May 28. (Fernando Bizerra Jr./European Pressphoto Agency)

JUST A couple of years ago, it was widely concluded that Brazil had finally overcome the decades-old gibe about the world’s fifth-largest country: that it would always be “the country of the future.” Exports, particularly to Asia, were booming; a middle class was filling in the once-polarizing gap between the very rich and very poor; and huge offshore oil discoveries appeared to ensure yet another economic acceleration. In seeming confirmation of its new status, Brazil was chosen to host both soccer’s World Cup last year and the 2016 Olympics.

The Rio de Janeiro games are still a year away, but already Brazil’s bubble appears to have burst. The economy is mired in a deepening recession, thanks to the drop in oil and other commodity prices. The state oil company, Petrobras, has triggered the biggest corruption scandal in the country’s history, with dozens of businesspeople and more than 50 members of Congress implicated in some $2 billion in kickbacks. Investments in the vaunted new oil fields have been cut back, even as Brazilians fume over the billions spent on new stadiums.

Most troubling, the setbacks have triggered a crisis for Brazilian democracy, which has flourished in the 30 years since a military government yielded power. Leftist President Dilma Rousseff, who is due in Washington next week for a long-delayed official visit, eked out reelection in October after claiming that her more conservative opponent would surrender to the dictates of bankers and the International Monetary Fund. Now, with Brazil’s credit rating in danger, Ms. Rousseff is imposing the same austerity measures typically favored by the IMF, including cuts in energy subsidies.

Meanwhile, allegations of corruption are pending against dozens of members of Ms. Rousseff’s party, including its treasurer, in connection with the Petrobras scandal. The heads of two huge construction firms, including the largest in Latin America, were arrested June 19. Two days later, a poll showed the president’s popularity had dropped to a record low of 10 percent. The Post’s Dom Phillips reported Ms. Rousseff has stopped appearing on television for fear she will only inspire more anti-government protests.

The president now faces the challenge of surviving in office, and attempting to govern, for another three-and-a-half years. It won’t be easy: She has seen much of her power effectively stripped away by congressional leaders, who diluted some of her austerity measures. Ms. Rousseff’s Workers’ Party objects to her economic corrections, which partly reverse her statist course during her first term.

But Brazil needs more liberalizing reforms. Petrobras’s corruption was in large part the product of Ms. Rousseff’s misguided policies, such as trying to restrict its suppliers to Brazilian firms. The president made much of $53 billion in investment deals she announced with visiting Chinese Premier Li Keqiang last month, including $7 billion in fresh financing for Petrobras. But to get back on track, Brazil needs not just checks from Beijing, but also the removal of disincentives for private domestic and foreign investment. Without it, Brazil’s future will remain on hold.