NEW YORK (Reuters) - Oil fell to a two-week low on Wednesday, after a surprising build in U.S. gasoline inventories and a rise in domestic crude output that is partially offsetting cutbacks by other countries trying to reduce a global glut.

Stacked rigs are seen along with other idled oil drilling equipment at a depot in Dickinson, North Dakota June 26, 2015. REUTERS/Andrew Cullen

U.S. crude futures CLc1 settled down $1.97 to $50.44 a barrel, a 3.8 percent drop, the biggest one-day decline since March 8. Brent crude settled down 3.6 percent, or $1.96 a barrel, to $52.93.

U.S. crude stocks fell 1 million barrels in the latest week, the U.S. Energy Information Administration said, a smaller draw than expected. Gasoline stocks posted a counter-seasonal build of 1.5 million barrels, despite heavier refining activity.

The surprise gasoline build, along with an increase in U.S. production and imports from OPEC nations, pressured prices. Weekly imports from OPEC nations rose by 900,000 barrels, the EIA said. [EIA/D]

“Inventories remain stubbornly high,” said Gene McGillian, manager of market research at Tradition Energy in Stamford, Connecticut. He added that as the United States is approaching the summer driving season, “the build in gasoline points to the fact demand isn’t as strong as we expected.”

The global crude glut has persisted even as the Organization of the Petroleum Exporting Countries and other producing countries have worked to reduce output almost 1.8 million barrels per day in the first half of 2017.

“Rising U.S. production levels are offsetting more than a third of the six-month agreement of the 1.8 million barrel-per-day cut,” McGillian said. “It’s the warning bell to the strength of the market.”

“They drop production, we add production, and so at end of the day it’s ugly,” said Robert Yawger, energy futures strategist at Mizuho Americas.

U.S. production rose to 9.252 million barrels a day in the latest week, highest since August 2015. Andrew Lipow, president of Lipow Oil Associates in Houston, said some in the market were concerned about the rapid recovery in shale production.

“Perhaps the amount coming out of the ground might be more than we anticipate,” he said.

Expectations for tighter supply boosted front-month futures contracts earlier this year against later-dated contracts. That trend has reversed.

On Wednesday, front-month Brent was 53 cents cheaper than the next month LCOc1-LCOc2 Wednesday; it was 29 cents at the beginning of the month. This condition, known as contango, suggests traders are less confident the glut is being reduced.

“Why is the whole curve in free-fall when supplies are supposedly tightening? It gets reported endlessly that the situation is rebalancing and the Brent curve continues to go deeper into contango,” he said.