RIO DE JANEIRO — No company has embodied Brazil’s rise like the oil giant Petrobras.

Bolstered by some of this century’s largest oil discoveries, Petrobras soared into the top ranks of global energy producers. Executives at the state-controlled company boasted that it could even outstrip Apple as the world’s most valuable publicly traded company. Political leaders here said Brazil was on the cusp of energy independence.

Now Petrobras is coming to symbolize something else entirely: the disarray afflicting Brazil’s sluggish economy and the reassessment of growth prospects in emerging markets around the world.

Instead of surging, Petrobras’s oil production has stagnated, heightening Brazil’s reliance on imported oil. Petrobras finds itself mired in corruption investigations and claims of managerial incompetence. And its debt load is exploding: Petrobras now ranks as the world’s most indebted company, dependent, more or less, on United States mutual funds to finance its ambitious investment plans.

“The decline of Petrobras has been stunning, swift and painful,” said Fábio Fuzetti, a partner at Antares Capital Management, a São Paulo investment firm. “This is the energy company that served as the model for others in developing countries,” he said. “Now it’s the example of precisely what not to do.”