Mexican state energy giant Pemex on Friday reported a loss of around $23 billion in 2020 as it grappled with a slump in oil demand caused by the coronavirus pandemic.
The company said it had faced "the worst crisis in its history" last year due to the health crisis sweeping the planet.
It blamed "the unprecedented combination of low prices for crude oil and petroleum products" and "a steep fall in fuel consumption that eroded the cash flows of all oil companies."
Pemex announced an annual loss of 481.0 billion pesos, an increase of 38 percent compared with 2019, despite returning to profit in the second half of the year.
Revenue slid 32 percent to 953.7 billion pesos.
Pemex joins oil firms worldwide that suffered massive losses as the Covid-19 pandemic grounded passenger jets, sparked an economic slump and caused oil prices to briefly turn negative for the first time.
For the fourth quarter of 2020, the group posted a profit of 124.2 billion pesos ($5.9 billion), helped by favorable currency movements, tax breaks and gains on financial instruments, it said.
That compared with a loss of 171.5 billion pesos in the same period of the previous year.
Pemex, which returned to the black in the three months to September, said it was the first time in more than four years that it had posted two consecutive quarterly profits.
Leftist President Andres Manuel Lopez Obrador has sought to help the firm regain its footing with a series of cash injections and other measures following years of declining production.
The company said that in 2020 it had achieved a "small but very significant increase" in oil production, which stood at around 1.7 million barrels per day on average.
Pemex said its debt rose to $113.2 billion, an increase of 13.9 percent from the end of 2019.
Rating agencies Fitch and Moody's have downgraded the company's credit rating to junk status due to its vulnerability in the face of low oil prices and its need for greater government support.
Mexico, a country of 126 million people, has registered almost 184,000 known coronavirus deaths -- the world's third-highest toll.