Crude oil stocks in the U.S. fell for the ninth consecutive week and gasoline stockpiles posted a surprise build last week, data from the U.S. Energy Information Administration (EIA) showed on July 20.

Crude inventories fell 2.3 million barrels (MMbbl) in the week ending July 15, data from the statistical arm of the Energy Department showed, largely in line with analysts' expectations for a decrease of 2.1 MMbbl.

But at 519.5 MMbbl, U.S. crude oil inventories are at historically high levels for this time of year, the EIA said.

Gasoline stocks rose 911,000 bbl after forecasts of them remaining unchanged, and are well above the upper limit of the average range, the EIA said. July is seen as the peak of a summer when Americans were expected to take to the road at record rates.

Stocks of the motor fuel rose in spite of gasoline output slipping 168,000 bbl/d and refinery crude runs rising 319,000 bbl/d as utilization rates edged up 0.9 percentage points to 93.2% of total capacity, the EIA data showed.

"While in-line with expectations, the drawdown is large enough to provide support, and refiner demand for crude remains elevated. The refinery production rate is more than meeting that gasoline demand, however," said John Kilduff, partner at New York energy hedge fund Again Capital

"The inventory overhang of crude oil and gasoline remains a significant limiting factor for prices," Kilduff said.

U.S. crude oil futures turned positive after the data, trading 0.4% higher on the day at $44.82/bbl by 11:12 a.m. EST (15:12 GMT).

U.S. gasoline futures briefly extended losses to hit a four-month low after the surprise build.

Distillate stockpiles, which include diesel and heating oil, fell 214,000 MMbbl, vs. forecasts of a 600,000-bbl rise.

U.S. crude imports rose by 293,000 bbl/d. Crude stocks at the Cushing, Okla., delivery hub for U.S. futures rose by 189,000 bbl, EIA said.