NEW YORK (Reuters) - Oil prices fell on Wednesday, after official data showed a larger-than-expected increase in U.S. crude inventories and a surprise build in gasoline stocks.

FILE PHOTO: An oil pump is seen operating in the Permian Basin near Midland, Texas, U.S. on May 3, 2017. Picture taken May 3, 2017. REUTERS/Ernest Scheyder/File Photo

U.S. crude inventories rose by 3 million barrels for the week ending Feb. 23, compared with analyst expectations for a build of 2.1 million barrels. Gasoline stocks also rose surprisingly. [EIA/S]

“We had another pretty sizable build, and with that it kind of seemed like this recent bull market had the carpet pulled out from underneath it,” said Phillip Streible, senior market strategist at RJO Futures in Chicago.

Brent crude futures fell for a second day after rising 6 straight sessions.

U.S. West Texas Intermediate crude CLc1 fell $1.37, or 2.17 percent, to settle at $61.64 a barrel. Most-active Brent crude futures LCOv1 for delivery in May were down $1.79, or 2.7 percent, to settle at $64.73 a barrel.

The April contract LCOc1 settled down 85 cents, or 1.28 percent, at $65.78 a barrel ahead of expiration.

Prices briefly pared losses after the U.S. Energy Information Administration released data showing crude production in December dipped to 9.95 million barrels, down 108,000 barrels per day (bpd) from November.

Prices resumed their downward path after that report, in which the EIA also revised its November crude production figures upward to a record 10.057 million bpd. [EIA/PSM]

“The market did attempt a late day rally but because it’s the end of the month, a lot of hedge funds decided to try and take some profits,” said Phil Flynn, analyst at Price Futures Group.

Soaring U.S. production, which has risen by a fifth since mid-2016, has kept a lid on oil prices this year, even as OPEC has maintained its supply cuts.

“We’ve got a lot more oil to produce and we’ll be through that 11 million barrel-per-day threshold much sooner than expected,” said Streible.

The entire energy complex was led lower by gasoline futures after a surprise build in U.S. gasoline stocks, which rose by 2.5 million barrels, compared with expectations for a 190,000-barrel drawdown. The most active U.S. gasoline futures RBc2 fell as much as 3.1 percent to $1.9354 a gallon.

The rise in inventories came even as refineries boosted activity in the most recent week.

“In spite of refiners undergoing maintenance, they continue to process more crude compared to previous years adding to gasoline and diesel supply,” said Andrew Lipow, president at Lipow Oil Associates in Houston.

The market was also pressured by the rising dollar and stock markets, said Flynn. Equities markets weakened on Wednesday, while the U.S. dollar .DXY hit a one-month high. A stronger dollar makes oil more expensive for holders of other currencies.

Prices were pressured earlier after three of the world’s top crude consumers- China, India and Japan - reported a slowdown in monthly factory activity.