U.S. oil rose $3.96, or 10.3 percent, to $42.56 in New York. The last time it posted a similar gain was a 10.3 percent jump on Dec. 11, 2008. Brent crude rose more than 9 percent in London.
Oil has been trading near a 6 ½ year low because of worries about the health of China's economy, concerns that had punished other commodities as well as global stock markets.
Thursday, China's main stock index rose the most in eight weeks, and U.S. stocks recorded a second day of strong gains following a six-day losing streak.