(Bloomberg) -- Petroleo Brasileiro SA announced a massive dividend payment after surging oil prices boosted cash generation in the second quarter, rewarding investors that looked past the political noise embroiling the state-owned firm.

The board of the Rio de Janeiro-based company approved dividends of 6.732 reais per share, totaling 87.8 billion reais ($17 billion), according to a regulatory filing Thursday. That’s about 87% of the total distributed from last year’s results -- which was a record -- and above Credit Suisse Group AG’s estimates of as much as $14 billion. 

Petrobras’s preferred shares gained as much as 4.1% amid the news, extending a five-session rally in Sao Paulo. Trading on the shares was temporarily halted shortly before the announcement as CNN Brasil reported on the dividend payment citing people with direct knowledge of the matter. 

The government has been putting pressure on Petrobras to lower fuel prices and bring forward dividend payments as a way to help tame double-digit inflation and fund increased social benefits. The company’s dividends for second quarter are enough to pay for the boosted aid, Treasury Secretary Paulo Valle said at a press conference this afternoon. 

The dividends are compatible with the company’s financial sustainability in the short, medium and long terms and in line with the commitment to create value for society and shareholders, Petrobras said in a statement.

The oil producer, which earlier Thursday said it was cutting gasoline prices for the second time in as many weeks, posts earnings after the close. 

©2022 Bloomberg L.P.