U.S. crude oil prices were marginally lower Tuesday as traders awaited government and industry data that should show a draw in crude oil supplies for the third consecutive week.
Front-month U.S. crude oil futures were consolidating just below the 15-month high of $107.45 made on Thursday, analysts said.
U.S. commercial crude stocks probably fell 2 million barrels on average during the week that ended July 12, a Reuters poll of eight analysts showed. Private forecaster the American Petroleum Institute will release its storage data at 4:30 p.m. ET.
"The market's keeping an eye on the report," said Gene McGillian, an analyst at Tradition Energy in Stamford, Conn. "Further gains in the rally are predicated on an improving fundamental outlook."
Oil demand has been strong. U.S. government data last week showed net crude oil inputs to refiners were the highest since July 2007. U.S. crude inventories plunged 20 million barrels over the previous two weeks, the deepest two-week draw on record.
U.S. oil shed 32 cents in rangebound trading to end the session at $106, after trading above $107 intraday.
Gasoline futures hit a four-month high. They were last trading at $3.14 a gallon.
The market was also awaiting Wednesday's testimony by Federal Reserve Chairman Ben Bernanke. Some investors think that the central bank will reduce its bond-buying this year and scrap it by mid-2014.
Tensions in Egypt were supporting Brent crude oil prices, which hit a three-and-a-half-month high, though there was scant evidence that any oil supply in the region was expected to be disrupted, analysts said.
Seven people were killed and more than 260 wounded when supporters of ousted President Mohammed Morsi clashed with the deposed Egyptian president's opponents and security forces through the night.
Brent crude oil futures were last trading 5 cents higher, at $109.14 a barrel, in choppy trading. Brent oil, the European benchmark, has risen 7.2 percent so far this month and is on track for its biggest monthly gain since August.
The August Brent contract expires at the end of trading Tuesday, and volume was thin. Brent September oil futures were last trading 14 cents higher, at $108.22.
Still, Brent oil has risen more than 7 percent this month and is on track for its biggest monthly gain since August, lifted by sharply falling U.S. crude oil inventories, an improving economic outlook and supply disruption. U.S. crude is up nearly 11 percent, its biggest rise since October 2011.
"Global demand has picked up strongly; there are huge supply problems at a time when refineries are increasing output," said Amrita Sen, analyst at Energy Aspects.
(Read more: Here's when high oil prices could really pinch)
She pointed to output disruption in Libya, which has been hit by protests, and Nigeria, which has been affected by oil theft that has led to the lowest output in years.
While U.S. oil supplies have risen from shale plays in North Dakota and Texas, some market watchers are questioning whether Houston refineries can continue to process the type of light oil those shales produce.
As pipelines get built and come online, more of that kind of crude has gone to Gulf Coast refineries, narrowing the spread between Brent, the global benchmark and the U.S. benchmark West Texas Intermediate.
The theory is that refiners have been reaching for domestic supplies in lieu of imports. But a slight widening in the spread may indicate that refiners are turning to Brent crude imports, keeping a premium on imports, some brokers said. The spread was last trading at $3.16, after Brent's premium to WTI traded as high as $1.32 on Thursday, the most since November 2010.
Global demand has picked up, analysts said, noting that production disruptions in Libya and Nigeria were tightening supply.
Mixed economic data still weighed on market sentiment. German analyst and investor sentiment unexpectedly fell in July after negative data for Europe's largest economy, a survey showed on Tuesday.
On Monday, data showed that China's annual GDP growth slowed to 7.5 percent in the second quarter but implied that oil demand in the world's second-largest oil consumer rebounded in June to the highest in four months.
—Reuters contributed to this report.