But prices were still on track to close the week 2 to 3 percent lower after concerns about weaker Chinese oil demand weighed earlier in the week.
At 11:52 a.m. GMT, benchmark Brent crude futures were up 6 cents at $51.09 a barrel on the day but still about 2 percent lower on the week.
US West Texas Intermediate (WTI) crude futures were up 11 cents at $47.20 a barrel, although they were also set to end the week more than 3 percent lower.
“Falling US commercial stocks are supportive and I also believe that high US product demand, and gasoline demand in particular, is helping too,” Tamas Varga, senior analyst at London brokerage PVM Oil Associates, said of Friday’s move up.
He also said a weaker dollar was bullish for oil prices as equity markets piled pressure on the greenback.
“Reports of a fire at Shell’s Deer Park refinery in Texas provided a small fillip to WTI prices,” said analysts at Cenkos Securities.
One unit at Shell’s large Deer Park joint-venture refinery in Texas was shut on Thursday by a fire, according to a regulatory filing. Sources added the unit would remain out of service for at least a week to carry out repairs.
The Brent forward curve has moved from contango into backwardation, where prices for immediate delivery are higher than those for the three future months. A backwardated market is considered a bullish sign for prices since it indicates demand is outpacing supply.
Signs of supply tightness have started appearing in the US, the world’s biggest oil consumer.
Despite a 13 percent jump in production since mid-2016 to 9.5 million barrels per day, the country’s commercial crude inventories have fallen 13 percent from their March records to below 2016 levels.