LONDON — Oil fell below $40 a barrel on Thursday, heading for the biggest weekly slide in two months, dented by record-high stockpiles in the US and a stronger dollar.

The US government’s Energy Information Administration said crude stockpiles climbed by 9.4-million barrels last week — three times the 3.1-million barrel build forecast by analysts in a Reuters poll.

The continued rise in stockpiles to record levels has reversed a sharp rebound in prices driven by plans among major producers, including Saudi Arabia and Russia, to freeze production.

Brent crude futures were down 92 cents at $39.55 a barrel by 1.56pm GMT. On Wednesday, they finished down $1.32, or 3.2% and are nearly 4% lower this week, on track for their biggest weekly slide since mid-January.

US crude futures were down $1.18 at $38.61 a barrel. On Wednesday, US crude closed down $1.66, or 4%, the sharpest one-day drop for the front-month contract since February 11.

Earlier this week, both benchmarks had been up more than 50% from multi-year lows hit in January.

"The (US inventory) data prompted profit-taking while hawkish rhetoric from Fed officials has pushed up the dollar," said Michael Hewson, chief analyst at CMC Markets.

A stronger dollar makes oil, priced in the US unit, less affordable to those holding other currencies.

Trade is expected to be thin on Friday, with many markets closed for the Easter holidays. Trading on Monday will also be light due to a public holiday in Britain.

A deal among a few Opec producers and Russia to freeze production is perhaps "meaningless" as Saudi Arabia is the only country with the ability to increase output, a senior executive from the International Energy Agency said on Wednesday.

Russia will export more oil to Europe in April than it has in any month since 2013 — despite Moscow’s plan to sign a global agreement on freezing production in a bid to lift the price of crude.

But Nigeria believes such an agreement is possible, its Petroleum Minister Emmanuel Ibe Kachikwu said.

Things could get worse for oil bulls, with trading houses betting on oil markets being over supplied for at least two more years and looking to extend or lock in new leases on storage tanks.