Starting in May, Petrobras has set aside about 20 percent of export proceeds in a special account for seven years, the company said in a securities filing on Wednesday. Rather than be accounted for as revenue, the values in the account accrue to shareholders' equity.

This will allow Petrobras to protect about 70 percent of its net debt from exchange-rate variations, the company said. The Brazilian real's recent decline against the dollar has caused the local-currency value of the company's foreign-currency liabilities and debt payments to rise sharply.

"This will help improve their second-quarter results because forex losses were expected to be high," said Lucas Brendler, oil company analyst with Banco Geração Futuro in Porto Alegre, Brazil. "At the same time it's going to distort their historical earnings."

Normally a decline in the Brazilian real against the dollar would require Petrobras, or any other company with dollar-denominated debts, to record a non-cash, non-operational cost on its income statement, reducing net profit or increasing a net loss.

In the second quarter of 2012, a weaker real led Petrobras to post its first loss in 13 years. Since early May, as declines in the value of the real against the dollar accelerated, Petrobras preferred shares, the company's most-traded class of stock, have lost more than a quarter of their value.

Petrobras preferred shares rose 1.54 percent to 15.21 reais in São Paulo on Wednesday before the change was announced.

Under Petrobras' new accounting system, allowed under generally accepted Brazilian accounting rule CPC-38, the increase in the local currency value of debt liabilities will be offset by the creation of an export-related foreign currency asset, according to Brazil's Committee of Accounting Pronouncements, which issued the rule.

"The use of hedge accounting will allow the gains or losses resulting from debt in U.S. dollars caused by exchange-rate variations to affect the company only when the protected exports are realized," the statement said. "The application of this practice permits that the company's results are better aligned with economic and operational realities."

Petrobras' debt has been soaring as production falls from old fields, new fields are delayed, and the government forces the Rio de Janeiro-based company to subside domestic fuel prices. This has led to increased borrowing to finance a $237 billion, five-year investment plan, the world's largest corporate spending program.

In the last three months, Brazil's real has plunged more than 13 percent against the greenback, making it the worst performer among the 36 most-traded currencies against the U.S. dollar, according to Thomson Reuters data.

"The change in accounting practices is another sign of how the government's interference in Petrobras distorts its operations," Brendler of Banco Geração Futuro said.

"While it will help investors focus on operational results, it will obscure costs imposed on it by the government, and if the currency starts moving the other direction it could even create new problems."

On June 7, Petrobras Chief Executive Officer Maria das Graças Foster said the company's expanding oil, gas and production assets would help prevent the company's rising debt from being downgraded by ratings agencies.

The outlook for debt at Petrobras, along with other Brazilian corporate bond issuers and Brazil's government, was downgraded to "negative" from "stable" on June 6 by Standard & Poor's rating service.

S&P cited weak Brazilian growth and confusion about the direction of government economic policy as reasons for the downgrade. Petrobras' debt is rated BBB by S&P. On March 31 Petrobras had net debt, or debt minus cash, of $74.8 billion. Most of its debt, 96 percent, is long-term, or due in more than one year.

(Editing by Bernard Orr and Muralikumar Anantharaman)

By Jeb Blount