Opec and allied nations have agreed to extend a production cut of nearly 10 million barrels of oil a day through to the end of July, hoping to boost energy prices hit by the coronavirus pandemic.

Ministers of the cartel and outside nations like Russia met via video conference to adopt the measure, aimed at cutting out the excess production depressing prices as global aviation remains largely grounded due to the pandemic.

It represents some 10% of the world’s overall supply.

However, danger still lurks for the market. Algerian Oil minister Mohamed Arkab, the current Opec president, warned attendees that the global oil inventory would soar to 1.5 billion barrels by the mid-point of this year.

“Despite the progress to date, we cannot afford to rest on our laurels,” Mr Arkab said. “The challenges we face remain daunting.”

That was a message echoed by Saudi Oil minister Abdulaziz bin Salman, who acknowledged “we all have made sacrifices to make it where we are today”.

He said he remained shocked by the day in April when US oil futures plunged below zero.

“There are encouraging signs we are over the worst,” he said.

Russian Energy minister Alexander Novak similarly called April “the worst month in history” for the global oil market.

The decision came in a unanimous vote, UAE energy minister Suhail al-Mazrouei wrote on Twitter.

He called it a “a courageous decision and a collective effort deserving praise from all participating producing countries”.

Crude oil prices have been gaining in recent days, in part on hopes Opec would continue the cut. International benchmark Brent crude traded on Saturday over 42 US dollars a barrel. Brent had crashed below 20 dollars a barrel in April.

The oil market was already oversupplied when Russia and Opec failed to agree on output cuts in early March. Analysts say Russia refused to back even a moderate cut because it would have only served to help US energy companies that were pumping at full capacity.

Stalling would hurt American shale-oil producers and protect market share.

Russia’s move enraged Saudi Arabia, which not only said it would not cut production on its own but said it would increase output instead and reduce its selling prices in what became effectively a global pricing war.

Prices collapsed as coronavirus and the Covid-19 illness it causes largely halted global travel.

Under a deal reached in April, Opec and allied countries were to cut nearly 10 million barrels per day until July, then eight million barrels per day through the end of the year, and six million a day for 16 months beginning in 2021.

However, some countries produced beyond their quotas set by the deal. One of them was Iraq, which remains decimated after the years-long war against the Islamic State group.

On Saturday, Iraq Oil minister spokesman Assem Jihad said in statement that Baghdad had “renewed its full commitment” to the Opec+ deal.

“Despite the economic and financial circumstances that Iraq is facing, the country remains committed to the agreement,” Mr Jihad said.

Analysts had expected Opec and the other nations to extend the cuts of 10 million barrels per day by one more month, but not longer, since the level of demand is still fluctuating.

“If the demand is great, countries like Russia will want to produce more oil, so they probably won’t want to get locked into a longer-term deal that may not help them,” said Jacques Rousseau, managing director at Clearview Energy Partners.