(Bloomberg) -- Petroleos Mexicanos will use a new $5 billion capital injection from the Mexican government to improve the embattled state oil company’s debt profile by lengthening maturities.

Pemex, as the company is known, will use the funds to prepay bonds due from 2020 to 2023, issue new debt maturing in 7, 10 and 30 years and swap bonds to provide additional support, the company said in an e-mailed news release Wednesday. Mexico’s finance ministry had announced the capital injection in an earlier statement, confirming a Bloomberg News report on Tuesday.

The company, the most indebted major oil producer with more than $100 billion in liabilities, is working to bolster cash flow and boost production as it fights a possible downgrade to junk credit rating. Proceeds from the transaction will be used to cut Pemex’s debt, the company said in the statement. The yield on Pemex bonds maturing in 2027 dropped 19 basis points to 6.28% on Wednesday.

“Even if it’s a little small, this is the real capital injection that the market has been demanding for almost a year now,” said Roger Horn, a senior emerging-market strategist at SMBC Nikko Securities America in New York. “That and the liability management exercise should clear up near-term maturities and give the rating companies reasons not to downgrade.”

JPMorgan Chase & Co., Goldman Sachs Group Inc., Citigroup Inc. and Bank of America Corp. are among the banks working on the transaction.

While the deal will help free up cash for Pemex in the short-term it isn’t enough to replace dwindling reserves and reverse long-term oil production declines, according to credit agencies. Pemex’s outlook remains negative because its capital expenditure still falls short of replacing reserves in 2019 and 2020, Moody’s said in a statement after the announcement.

The deal, which will include a swap for U.S.-denominated bonds maturing between 2022 and 2048, and the repayment of revolving credit facilities, represents moderate government support for Pemex, Fitch Ratings Inc. said in a release. The agency in June cut the oil producer’s bonds to junk, with Moody’s shifting its outlook to negative.

“Although Pemex has implemented some cost cutting measures and received moderate tax cuts from Mexico, the company continues to severely under-invest in its upstream business, which could lead to further production and reserves decline,” Fitch said. “The very high level of transfers from Pemex to the Mexican government continues to significantly pressure Pemex’s cash flow generation and reinvestment ability.”

Government support has been close to $10 billion so far this year -- including the $5 billion capital injection announced Tuesday, a previously announced $1.3 billion cash infusion, $1.5 billion in tax relief and $1.8 billion in pension notes payouts.

Nevertheless, its high tax burden -- equivalent to about 88% of its Ebitda in the first half of the year -- cancels out much of the benefits. And it requires about $20 billion a year to meet its investment requirements to raise oil production, BBVA said last month.

(Adds comments from Moody’s and Fitch in the final paragraphs.)

--With assistance from Cyntia Barrera Diaz, Aline Oyamada and Justin Villamil.

To contact the reporters on this story: Eric Martin in Mexico City at emartin21@bloomberg.net;Amy Stillman in Mexico City at astillman7@bloomberg.net

To contact the editors responsible for this story: Juan Pablo Spinetto at jspinetto@bloomberg.net, Alec D.B. McCabe

©2019 Bloomberg L.P.