Oil extended losses on Wednesday, reversing a four-session rally after U.S. crude inventories jumped to a record high, shifting the global glut back in to focus.

Crude's nearly 20-percent surge since Friday had raised speculation oil's seven-month rout may be at an end, but the sharp sell-off on Wednesday indicated prices may not yet have found a floor, with the market still well supplied.

The U.S. Energy Information Administration said U.S. crude stocks rose by 6.3 million barrels last week to 413.06 million barrels, the highest level since records began in 1982. It was also the fourth consecutive weeks of gains.

Crude stocks at Cushing, Oklahoma, delivery point of the U.S. crude oil contract rose by 2.5 million barrels, while gasoline and distillate stocks also jumped.

U.S. crude futures settled down 8.7 percent, at $48.45 a barrel, posting its largest one-day percentage drop since November 28, 2014. It closed up 7 percent on Tuesday, after trading at $54.24 earlier in the day—above a near six-year low of $43.58 hit last week.

Brent crudewas $4 lower at $54 a barrel, having traded as high as $59 a barrel on Tuesday—well above lows for the year close to $45 a barrel hit two weeks ago.

WTI price trend on Wednesday

"Just looking at the overall picture, there is no shortage of oil anywhere," said Sal Umek at the Energy Management Institute in New York. "It is bearish straight across the board."

Since prices fell by 60 percent between June and January, traders have wrestled with whether the dramatic price collapse would be enough to slow fast-growing U.S. shale output or whether oil still had further to fall.

While a sharp drop in the number of U.S. oil rigs and a wave of budget cuts by major energy companies boosted speculation production would fall faster than expected, analysts predict the market will still be oversupplied for the first half of the year.

Other factors are also influencing the outlook, with the dollar steadying after its worst day in more than a year. The U.S. unit rose against a basket of currencies by 0.2 percent, making dollar-traded commodities more expensive.

The outlook for oil demand has also been muddied by signs the Chinese economy is slowing. On Wednesday data showed China's services sector grew at the slowest pace in six months in January.