The price of oil rose Tuesday amid optimism over an improving U.S. economy and encouraging data from China.

Benchmark U.S. crude for January delivery was up 38 cents at $97.72 a barrel at midafternoon Kuala Lumpur time in electronic trading on the New York Mercantile Exchange. The contract fell 31 cents to $97.34 on Monday.

China's industrial output rose 10 percent from a year earlier in November, slightly lower than October's increase, while retail sales grew a higher-than-expected 13.7 percent.

The China data, coupled with stronger U.S. hiring, added to expectations of rising energy demand from the world's top two economies.

The U.S. government said Friday that unemployment fell to a five-year low in November while employers added a greater-than-expected 203,000 jobs last month. Earlier data showed the U.S. economy grew at a 3.6 percent annualized rate in July through September, the fastest since early 2012.

Brent crude, a benchmark for international oils, was up 24 cents at $109.63 a barrel on the ICE exchange in London.

In other energy futures trading on Nymex:

— Wholesale gasoline rose 0.7 cent to $2.682 a gallon.

— Heating oil added 0.7 cent to $3.021 a gallon.

— Natural gas gained 0.4 cent to $4.236 per 1,000 cubic feet.