U.S. crude settled up 55 cents to $71.97 a barrel, with gains in heating oil futures leading the energy complex higher. London Brent crude rose $1.23 to end at $75.51.
U.S. inventories of distillates -- which include heating oil as well as key fuels for industry such as diesel -- fell by 1.0 million barrels last week, according to the U.S. Energy Information Administration.
Distillate demand during the four weeks to July 31 rose to nearly 3.4 million barrels per day, up from 3.3 million bpd in the previous report, although still down 7.9 percent from year-ago levels.
In today's EIA report, we saw distillate inventories drop and demand increase. I think that has boosted heating oil, said Gene McGillian, analyst for Tradition Energy in Stamford, Connecticut.
U.S. heating oil futures settled up 2.92 percent, with traders citing higher distillate demand outside the United States as adding further support.
The distillate draw helped counter a 1.7 million barrels rise in U.S. crude inventories last week, against forecasts for an 800,000-barrel build, as refinery cut back on utilization rates.
Further strength came as markets eyed the brighter side of U.S. economic data, with investors hoping a slower pace of U.S. private job losses in July hinted at gradual improvement in the economy. The number of U.S. jobs lost in the private sector fell in July but firms increased planned layoffs, according to the ADP Employer Services report.
The data prompted investors to sell the dollar and put money into riskier plays. The euro hit a fresh nine-month high against the dollar, boosting commodities denominated in the greenback.
The dollar weakness is the only thing out there that is supportive. But the bulls are trying to take control of the market and test $72, said Dan Flynn, analyst at PFGBest Research in Chicago.
Energy markets have been looking to broader economic data for signs of an end to the recession and a potential rebound in oil demand. Optimism has helped lift crude from below $33 a barrel in December, well off record highs near $150 reached in July 2008.
Further support has come from a series of output reductions agreed by the Organization of the Petroleum Exporting Countries (OPEC) last year.
OPEC member Kuwait said the producer group would likely keep output targets unchanged when it next meets in September if prices stay at current levels.
The wide price swings in oil in recent years have spurred calls for greater market regulation.
The U.S. Commodity Futures Trading Commission, which oversees regulated futures exchanges, held its third and final hearing on Wednesday into whether it should limit how many futures contracts hedge funds, investment banks and other speculators can control to help limit big movements in energy prices.
Funds that invest heavily in the sector argued that they were not responsible for the wild volatility in energy prices, while CFTC Chairman Gary Gensler reiterated the commission should seriously consider setting position limits.
The UK Financial Services Authority and the UK Treasury also met with oil industry representatives to discuss market transparency and regulation, but issued no statement after the encounter.
(Reporting by Matthew Robinson, Robert Gibbons, and Gene Ramos in New York; Joe Brock in London; Editing by Lisa Shumaker)