US oil settles up 3.4%, at $49.43 a barrel; highest since July

Pipeline and crude storage tanks in Cushing Oklahoma.
Justin Solomon | CNBC

Oil prices climbed to their highest level since July on Thursday, as buoyant Chinese equity markets encouraged buying, and as Russia's military involvement in Syria brought a geopolitcal risk premium into the market.

The market shrugged off concern about the higher-than-expected U.S. crude stock build as reported by the U.S. Energy Information Administration on Wednesday.

U.S. crude futures closed up 3.4 percent, at 49.43 a barrel — their highest level since July. Brent crude oil futures rose $1.80, or 3.5 percent, to $53 a barrel, after touching a five-week intra-day high of $53.30.

Read More Crude awakening: Beware oil's 'dead cat bounce'

Chinese stock markets rose 3 percent after a week-long holiday, the biggest rise in two trading weeks.

"Sentiment regarding China appears to have shifted of late and we feel that further stability in the Chinese stock market will limit downside price follow-through across the energy complex," said Jim Ritterbusch, president of Galena, Illinois-based Ritterbusch & Associates.

Oil could climb to $70: Boone Pickens
Middle East has new sheriff... Russia: Boone Pickens
Gartman: We've seen the low in oil

Syrian troops and allied militias backed by Russian airstrikes and cruise missiles attacked rebel forces as the government extended a major offensive in the west.

The United States ruled out military cooperation with Moscow and called its strategy "tragically flawed."

Read MoreOil rally can boost broader markets: Expert

"The situation is getting complicated very quickly and raising the geopolitical risk in the region to a new high," Energy Management Institute analyst Dominick Chirichella said about the ongoing conflict in Syria.

"This has caught the attention of the market place (and) is viewed as a situation that could potentially impact the flow of oil from the region as well as degrading the already declining relationship between Russia and the U.S."

Brent is on track to rise more than 10 percent this week, close to its largest weekly increase since early 2009, after oil industry executives warned that this year's fall below $50 would force higher-cost producers to reduce output.

"There was a hiccup with the U.S. data this week, but production is still expected to continue to slow," Saxo Bank commodities strategist Ole Hansen said.

Underpinning the crude complex was a drop in the dollar ahead of the release of the minutes of the Federal Reserve's most recent policy meeting.

A weaker dollar tends to make it cheaper for non-U.S. investors to buy dollar-denominated assets.

Read MoreGoldman Sachs sees oil rally fading

"We continue to view the oil market as oversupplied and with low prices required to achieve the sufficient rebalancing in 2016," Goldman Sachs analysts said in a note.

"And if the Fed's potential dovish shift has been one of the catalysts for the rebound in prices, we view this in fact as a bearish development as weaker activity in the U.S. and in (emerging) economies leaves risk to our demand forecast skewed to the downside," the bank said.