Brent crude settled at $59.12 a barrel, rising $1.37, or 2.4%. U.S. oil settled at $53.29, gaining $1.24, or 2.4%.

Official data showed new coronavirus cases in China fell for a second day, although the World Health Organization said there was not enough data to know if the epidemic was being contained.

Wall Street reached new highs on optimism China would stimulate its economy and counteract the impact of the outbreak.[.N]

"It seems like the oil market is trying to catch up with the stock market and put the coronavirus in the rear-view mirror or discount it mightily," said John Kilduff, a partner at Again Capital in New York.

China is expected to cut its benchmark lending rate on Thursday to limit damage from business shutdowns and travel curbs. The world's second-largest economy has imposed city lockdowns and travel restrictions to contain the virus that has now killed more than 2,000 people.

S&P Global Ratings said it expected the virus would deliver a "short-term blow" to economic growth in China in the first quarter, echoing findings by the International Energy Agency.

The oil market price structure is also showing signs that prompt demand for oil is picking up, as the front-month Brent futures market is moving deeper into backwardation , when near-term prices are higher than later-dated prices.

Graphic: Brent backwardation, https://fingfx.thomsonreuters.com/gfx/ce/7/8597/8578/Brent%20back%20in%20backwardation.jpg

This week, oil prices were buoyed by a U.S. decision to blacklist a trading subsidiary of Russia's Rosneft, which President Donald Trump's administration said provided a financial lifeline to Venezuela's government.

The deterioration of supply out of Libya due to a blockade of ports and oilfields also tightened the crude market and propped up prices.

Hopes that the Organization of the Petroleum Exporting Countries and allied producers would deepen supply cuts also supported oil futures.

The grouping, known as OPEC+, has been withholding supply to support prices and meets next month to decide a response to the downturn in demand resulting from the coronavirus epidemic.

But in the United States, which is not party to any supply cut agreements, oil production has been rising. U.S. shale production is expected to rise to a record 9.2 million barrels a day next month, the Energy Information Administration said.

Graphic: U.S. rig count, crude production , https://fingfx.thomsonreuters.com/gfx/editorcharts/US-OIL-RIGS/0H001PBQ55VR/eikon.png

By Laila Kearney