Brazilian President Dilma Rousseff. (Adriano Machado/Reuters)

IF THE global economy is being dragged toward a downturn by China and other large developing countries, then Brazil is one of the principal dead-weight anchors. Once celebrated as a rising power alongside South Africa and India, the Latin American giant is mired in its worst recession in decades, compounded by a political crisis that could lead to the impeachment of President Dilma Rousseff. What’s more, recovery will require Brazil to face deep-seated structural problems in both its economy and its political system — something its current leaders are unlikely to do.

One primary cause of the trouble is both easy to detect and common to Latin American and African economies: plunging commodity prices. Brazil depends on exports of iron ore, soybeans and other basic goods for 45 percent of its trade revenue, and prices for these have collectively fallen by more than 40 percent since 2011. Having borrowed heavily to develop deep offshore oil deposits, the state oil company Petrobras is now the most indebted in the world and will struggle to sell oil at $30 a barrel.

Yet Brazil’s problems go far deeper than the downcycling of commodity prices. For a decade, the country relied on those growing exports to paper over structural problems. When the global recession hit, it borrowed heavily to sustain growth — public debt, as a percentage of Brazil’s overall wealth, is now nearly twice that of Greece, according to the Economist . Meanwhile, corruption flourished. As much as 40 percent of the current National Congress is under criminal investigation, including dozens of legislators suspected of taking bribes in connection with Petrobras contracts. For her part, Ms. Rousseff is charged with concealing excess government spending ahead of her 2014 reelection; an impeachment vote in Congress could come next month.

Getting out of this mess will require more than a purge of legislators and a recovery of China’s appetite for raw materials. Brazil will have to tackle fiscal and political ills that, in many instances, are written into its 1988 constitution. The charter mandates heavy and growing government spending, especially for pensions; workers typically retire in their 50s, and the Brazilian government is obliged to devote almost 12 percent of gross domestic product to them — more than in rich and aging Japan.

The congressional election system, meanwhile, makes famously fractious Israel look stolid. Parties can win seats by gaining less than 1 percent of the national vote; as a result, more than two dozen are represented in Brasilia, and vote selling by marginal deputies is a chronic problem. Fixing these and other distortions would require a three-fifths vote in both congressional houses for constitutional amendments. That’s a most unlikely prospect, given that Ms. Rousseff, with a 12 percent approval rating, is fighting for her political life by appealing to a left-wing base that opposes all austerity measures.

Brazilian politicians, like the country’s famous soccer stars, are good at improvising, so it’s possible that the country will maneuver through what is likely to be the recession’s second year in 2016 without a debt default. The current betting is that Ms. Rousseff will survive the impeachment process. But the reforms needed for the country to thrive again may be years away, which is more bad news for the global economy.