Futures erased Tuesday's gains in New York after the American Petroleum Institute was said to report gasoline stockpiles in the world's largest economy surged by 9.2 million barrels last week, Bloomberg said.

That would be the largest increase since January 2016 if federal government data confirm it on Wednesday. The magnitude of the build overshadowed expectations about shrinking U.S. supplies of stored crude.

Read alsoReuters: Oil prices edge up on expected drop in U.S. crude stocks"That's a pretty bearish number on gasoline," Kyle Cooper, director of research at IAF Advisors in Houston, said by telephone. Still, "I don't think gasoline demand is going to fall apart all of a sudden."

Oil advanced the last three months and traded higher during Tuesday's session as OPEC and allied producers pledged to extend supply limits through all of 2018 to whittle down global inventory levels. The cartel's output dropped last month to the lowest in half a year. Goldman Sachs Group Inc. forecast that oil prices will retain strength at least through next year. Bank of America Merrill Lynch estimated the global benchmark, Brent crude, will rise to $70 a barrel by the middle of 2018.

"If you extend the production-cut agreement through the end of 2018, that surplus will basically erode away, which will be a good thing for oil prices in the long-term," Rob Thummel, managing director at Tortoise Capital Advisors LLC, which handles $16 billion in energy-related assets, said in a Bloomberg Television interview.

West Texas Intermediate for January delivery traded at $57.46 a barrel at 4:43 p.m. after settling at $57.62 a barrel on the New York Mercantile Exchange. Total volume traded was about 31 percent below the 100-day average.

Brent for February settlement added 41 cents to end the session at $62.86 on the London-based ICE Futures Europe exchange. The global benchmark crude traded at a premium of $5.19 to February WTI.

Goldman increased its 2018 Brent estimate to $62 a barrel, from $58, and its WTI forecast to $57.50, from $55.

The API report was also said to find that crude inventories slid by 5.48 million barrels last week and supplies at the key Cushing, Oklahoma, pipeline hub declined by 1.95 million barrels, the people said. Distillates rose by 4.26 million barrels.

U.S. crude stockpiles probably declined by 2.5 million barrels last week, according to the median estimate in a Bloomberg survey before an Energy Information Administration report scheduled to be released on Wednesday. Inventories at Cushing probably slid by 2.4 million barrels, a separate forecast compiled by Bloomberg showed.