The president of Mexico -- the lone holdout in an OPEC deal to cut crude production and shore up prices -- said Friday he has reached a deal with President Donald Trump to reduce oil output.

Mexico will cut production by 100,000 barrels per day (bpd), President Andres Manuel Lopez Obrador said, adding that it was Trump who reached out to him.

"Trump communicated with us," he told a news conference.

The announcement came hours after OPEC revealed that major oil producers around the world -- except Mexico -- had agreed to cut output by 10 percent.

Oil prices have been wallowing near two-decade lows due to the coronavirus pandemic and a price war between key players Saudi Arabia and Russia.

The agreement would see output between May and June cut by 10 million bpd and another eight million from July to December, but it depends on Mexico's consent to take effect.

Under the Organization of the Petroleum Exporting Countries deal, Mexico would have had to cut its output by 400,000 bpd.

But Mexico resisted, and wanted the reduction limited to 100,000. Lopez Obrador said on Friday that Trump agreed to cut US production by an extra 250,000 bpd "as compensation" for Mexico.

"They asked us for a reduction like that of Saudi Arabia, like that of Russia, of around 23 percent of production," said Lopez Obrador. "We resisted to the end because it cost us a lot of effort to raise production."

Under a war-time emergency law, Trump could in fact order US oil companies to modify production levels but normally this would be for them to churn out more crude, not less.

In February, Mexico's state oil company Pemex reported losses of 346 billion pesos ($18.3 billion) for 2019, a 92 percent increase on the previous year's deficit.

Mexico President Andres Manuel Lopez Obrador (center) has come under fire for his handling of the coronavirus outbreak due to his reluctance to take measures that would hurt the country's economy
Mexico President Andres Manuel Lopez Obrador (center) has come under fire for his handling of the coronavirus outbreak due to his reluctance to take measures that would hurt the country's economy Mexican Presidency / Handout

Production has fallen by 50 percent since 2004 when it was 3.4 million bpd.

Leftist Lopez Obrador, who came to power in late 2018, said Mexican oil production fell for 14 years due to the energy reform policies of the previous government that opened up the sector to private enterprise.

"They estimated that the energy reform would attract foreign investment. They gave out contracts and estimated that we would produce three million barrels a day but the truth is we have a production of 1.7 million barrels," said the president.

The Lopez Obrador government has already invested $10 billion in Pemex in a bid to prop up the finances of a company considered a bulwark of national sovereignty.

While the government hasn't canceled the privatization initiative of the previous administration, it has stopped issuing new exploration contracts.

Meanwhile, Lopez Obrador also said he'd also asked Trump to sell Mexico equipment to treat people suffering from the new coronavirus.

He said he asked Trump to "sell us 10,000 ventilators and 10,000 monitors," adding that the US president said he would give him a reply on Friday afternoon at the latest.

Medical professionals in Mexico have complained about a lack of basic protective equipment needed to treat COVID-19 patients.

There are also worried about the ability of Mexico's health care system to cope with a spike in coronavirus numbers.

The country has already started buying supplies from China and this week received a cargo of face masks, gloves and ventilators.

It has recorded more than 3,000 cases and 174 deaths from virus.