Crude oil prices tumbled but then regained some lost ground on Monday after oil-rich countries failed to reach an agreement Sunday on freezing production.

U.S. crude oil was trading $1.88 lower at $38.48 a barrel by mid-afternoon in electronic trading on the New York Mercantile Exchange. It sank to a low of $37.61 a barrel, down 6.8 percent, before regaining some of that loss.

Brent crude oil, which is used to price international crude oil, fell $1.87 to $41.23 a barrel early Monday, down 4.3 percent. It tumbled 7 percent in earlier trading.

The effort to reach an accord on freezing production to support prices failed after Iran stayed away from a weekend meeting of 18 oil producing nations in Qatar that had been expected to boost crude prices.

"The market basically rallied from $26.05 to levels above $40 on the 'hope' that there would be some kind of agreement at Doha. That did not happen," said Robert Yawger, director of energy futures at Mizuho Securities USA.

Since U.S. crude oil supplies are at all-time highs, Iran is increasing output and Libya is due to step up production, so "prices will trade lower. Maybe sharply lower," he said.

Oil prices hit a 12-year low in January, dipping under $30 a barrel, but had risen above $40 in recent days, buoyed by bullish talks surrounding the Doha meeting.

The latest setback means prices will likely remain in the doldrums for the time being, though in the longer run the recent cutbacks in investments will help to rebalance supply and demand, said Fadel Gheit, a senior energy analyst at Oppenheimer & Co.

"We believe prices will rise regardless what OPEC does or does not do as U.S. shale oil production, not Saudi Arabia, will be the new swing producer," Gheit said.

"Time is not on OPEC's side and technology is its biggest enemy. We believe oil prices will rise to a sustainable level closer to $60, the new normal, not $100 and not $40 either," he said.