What happened

Shares of Petroleo Brasileiro (PBR -0.13%), aka Petrobras, jumped by as much as 13% Thursday morning after the Brazilian oil giant stunned Wall Street with its second-quarterly performance and attracted a flurry of analyst upgrades. It was, in fact, such a stellar quarter that Petrobras will now not only pay hefty dividends to shareholders but distribute some of them earlier. As of 2:30 p.m. EDT, the stock was up by about 9%.

So what

Petrobras' revenue more than doubled to $21 billion in the second quarter, boosting its net income to $8.1 billion versus a loss of $417 million in the year-ago quarter. Higher crude oil prices and sales, both in its domestic market and abroad, drove those gains. Exports were particularly strong, as its export revenue more than doubled to $6.4 billion. Petrobras is one of the largest oil producers in the world, and exports to countries including China, the U.S., Chile, Portugal, and India.

During the quarter, the company spent $2.4 billion in capital expenditures, much of which went to capacity expansion. Thanks to its stupendous earnings growth, though, the company's free cash flow more than tripled to $9.3 billion, and it ended the quarter with cash and cash equivalents of $9.8 billion on the books.

But here's the most important number: Petrobras paid down nearly $27.5 billion worth of debt during the quarter. It now expects to hit its gross debt target of $60 billion this year rather than in 2022.

Two people smiling while counting money.

Image source: Getty Images.

That's excellent news for shareholders given the company's dividend policy, under which it aims to pay out larger dividends to shareholders as long as it can reduce debt, regardless of how much profit it earns or loss it incurs in a given year. Having retired a big chunk of its debt, Petrobras approved a shareholder payout of $6 billion, $4 billion of which will be distributed to shareholders this month. That's huge: In the past three years combined, Petrobras only paid out $6.6 billion in dividends.

In recognition of all this, analysts at Credit Suisse and Scotiabank upgraded their ratings on Petrobras shares Thursday morning. While Credit Suisse set a price target of $14 a share, Scotiabank believes the stock will hit $16 in the next year. Petrobras shares were still changing hands at around $11.25 as of this writing.

Now what

Petrobras shares dropped sharply in the first quarter, but they've risen significantly over the past three months as investors anticipated better days for the once-beleaguered oil giant thanks to the rally in crude prices. Petrobras didn't disappoint, and its large dividend payout should support the stock's 3.6% yield. Importantly, now that the company is closer to its gross debt target, shareholders can expect regular -- and even fatter -- dividend checks in the future.