Mexico’s state-owned oil company Petroleos Mexicanos (Pemex) has secured US$5 billion to cover its financing needs for 2017 and 2018, consolidating its liquidity position.

The strengthening of the company, enhanced by private investments in the long-held oil and gas giant, “allows it to maintain its presence in financial markets and to draw upon them should it decide to do so, to procure a greater liquidity and optimize the financial conditions of cost and term of the various sources of financing,” management said.

“With results, the energy reform moves forward and Pemex is strengthened to remain as Mexico’s flagship company.”

Management said its credit strategy is supported by diversifying financing and market sources, diversifying investors and an improved debt profile.

Pemex developed a varied portfolio that includes national and international financial markets, banking credit lines and credit with international import and export agencies. It likewise widened its presence in various markets and currencies.

In addition, the investors are now varied, including not only Mexican investors but also those from the United States, Latin America, Europe and Asia.

Pemex noted that 80% of its debt now is at a fixed rate, with a half-life of more than eight years, allowing for “considerable reduction of the uncertainty and risk associated with financing.”

The Mexico exploration and production giant often has required external financing to supplement its operations, as the entity has generated an estimated $85 billion in negative free cash flow since 2000, per Bloomberg figures. Perhaps coincidentally, that averages to roughly $5 billion per year, the amount of its latest debt issuance.

Declining crude oil prices in recent years certainly haven’t helped, but another major reason for Pemex’s continuing financing needs is what the company deems “our heavy tax burden.” For example, in 2016, Pemex paid about 32% of its sales revenues to the Mexican government in the form of taxes and duties, which the company said constituted “a substantial portion of the Mexican government’s revenues.”

Pemex exited 2016 with $87.4 billion in long-term bank debt, plus another $59.1 billion owed in the form of unfunded reserves for retirement pensions and seniority premiums.

Even with that massive debt load, the various rating agencies are comfortable enough with Pemex’s future outlook to give it a long-term local currency investment grade rating, ranging from “Baa3 Negative” at Moody’s Investors Service, “BBB+ Stable” at Standard & Poor’s Ratings Services, and “BBB+ Negative” at Fitch Ratings.