MEXICO CITY—Mexico's state oil company Pemex posted another quarter of major losses on July 26, weighed down by falling output and lower crude prices, as the heavily indebted firm faces the prospect of a fresh downgrade from credit agencies critical of its direction.

President Andres Manuel Lopez Obrador has pledged to rescue the ailing Mexican oil giant by growing the firm's government-supplied budget, lowering its tax bill and rooting out corruption, but the latest numbers remained mostly gloomy.

Pemex's second quarter loss of 52.7 billion pesos (US$2.7 billion) was nearly 70% lower than the losses it chalked up during the same period last year, a drop it said was driven by a reduction in costs.

During the April to June period, the company's crude production dipped more than 10% to 1.661 million barrels per day (MMbbl/d) compared to the same quarter last year, according to a filing with the Mexican stock exchange.

The filing, however, emphasized that average crude output in the second quarter was stable compared to output during the first three months of the year.

The price of Pemex's crude export mix dipped about 3% during the quarter to average about $60.30 per barrel, compared to roughly $62.10 during year-ago period.

In June, ratings agency Fitch downgraded Pemex debt to speculative, or so-called junk status, while Moody's changed the company's credit outlook to negative which usually implies a possible downgrade within six months to a year.

If Moody's were to also downgrade Pemex's debt to junk, it would likely trigger billions of dollars in forced selling of bonds and push the company's financing costs up.

Total financial debt, however, fell nearly 4% during the quarter to total US$104.4 billion, the company said, while financing costs slid by nearly half due in part to the Mexican peso's strengthening relative to the U.S. dollar.

Earlier this month, the government unveiled a new business plan for Pemex that pledged an additional US$7.2 billion in government support over the next three years and a gradual 11% reduction to its tax bill by 2021.

In the second quarter, Pemex taxes fell by slightly more than 11% to total 103.2 billion pesos, the company said, driven by lower output and government's new tax scheme for the firm, including higher allowed deductions.

Crude output is expected to grow to some 1.72 MMbbl/d by the end of 2019, Ulises Hernandez, a senior executive with Pemex's exploration and production arm, told analysts on a Friday conference call after the results were released.

Under President Lopez Obrador, the fully state-owned oil and gas producer is making significant investments in its troubled refining business as well as taking a pass on new partnerships with foreign and private oil firms to boost output.

The president's priorities for Pemex have been sharply criticized by investors as unwise, especially his plan to build what would be the country's largest oil refinery, an $8 billion investment that many argue should instead be directed toward raising crude output.

While the amount of crude the company processed into higher-value refined products like gasoline fell about 16% from April to June compared to last year's second quarter, processing was up by about 6% compared to the first quarter.

Meanwhile, the company's crude exports, Pemex's main source of income, dipped by nearly 70,000 bbl/d during the quarter compared to the same three-month period in 2018, with the largest dip in April.