NEW YORK (Reuters) - Oil prices rose on Friday, bringing an end to another week of losses that featured the U.S. contract plunging to minus $40 a barrel, as global production cuts could not keep pace with the collapse in demand caused by the coronavirus pandemic.

FILE PHOTO: Crude oil storage tanks are seen in an aerial photograph at the Cushing oil hub in Cushing, Oklahoma, U.S. April 21, 2020. REUTERS/Drone Base/File Photo

Oil trading was extremely volatile all week, in an extension of the selling that has dominated trading since early March as demand collapsed 30% due to the pandemic.

While certain fundamental factors, such as a sharp fall in active drilling rigs in the United States, were nominally bullish for oil prices, the positive effects of those moves are months down the road.

“It was a totally brutal week,” said Todd Staples, president of the Texas Oil & Gas Association trade group. “The volatility we saw with negative pricing was to the extremes.”

Brent futures LCOc1 rose 11 cents, or 0.5%, to settle at $21.44 a barrel, while U.S. West Texas Intermediate crude CLc1 rose 44 cents, or 2.7%, to close at $16.94.

Oil futures marked their third straight week of losses, with Brent ending down 24% and WTI off around 7%.

Traders expect demand to fall short of supply for months due to the economic disruption caused by the pandemic. Producers may not be slashing output quickly or deeply enough to buoy prices, especially when global economic output is expected to contract by 2% this year, worse than the financial crisis.

“The efforts to curtail supply just struggle to even come close to matching coronavirus demand destruction,” John Kilduff, partner at hedge fund Again Capital LLC in New York, said.

After trading near unchanged for most of the day, the benchmarks rebounded in the afternoon after energy services firm Baker Hughes Co BKR.N said producers in April cut the number of active U.S. oil rigs by the most in a month since 2015. In Canada, drillers slashed the number of oil and natural gas rigs to a record low.

“The rig count was another stunner. These are meaningful cuts and they have come at a rapid pace,” Kilduff said.

Storage is quickly filling worldwide, which could necessitate more production cuts, even after the Organization of the Petroleum Exporting Countries and allies including Russia agreed this month to cut output by 9.7 million barrels per day.

“Despite the measures taken by OPEC, oil producers in various countries should be aware that they may be called to take more drastic measures,” Diamantino Azevedo, Angola’s resources and petroleum minister, told state news agency ANGOP on Friday. Angola is a member of OPEC.

Russia plans to halve oil exports from its Baltic and Black Sea ports in May, according to the first loading schedule for crude shipments since it agreed to cut output.

Still, onshore oil storage is currently filled to nearly 85% capacity, according to energy research firm Kpler.