Oil recovers to end at $40.45, after hitting milestone

Hogan: Markets won't stabilize till oil does
Expert: Oil gets to mid-$20s
Has crude hit bottom? Not yet: Pro
Safe energy bets

U.S. oil prices recorded their eighth consecutive week of falls, the longest losing streak since 1986, after a sharp drop in Chinese manufacturing increased worries over the health of the world's biggest energy consumer.

U.S. oil futures fell below $40 a barrel for the first time since 2009 on Friday before settling down 87 cents, or 2.11 percent at $40.45 a barrel.

Baker Hughes also said that U.S. weekly rig counts rose for the fifth straight week, increasing by 2 to 674. Last year, U.S. oil rigs totaled 1,564.

Activity in China's factory sector shrank at its fastest pace in almost 6-1/2 years in August as domestic and export demand dwindled, adding to worries about lower consumption of crude in the second-biggest oil user.

Read More The oil bottom is in when the handcuffs come out

Asian and European stocks followed Wall Street lower as fears took hold of a China-led slowdown in global growth.

Ty Wright | Bloomberg | Getty Images

Brent oil was on track for its seventh weekly decline in eight, down 2.40 percent at $45.50 a barrel, after settling 54 cents lower on Thursday.

"The market is stuck in a relentless downtrend," said Robin Bieber, a director at London brokerage PVM Oil Associates. "The trend is down - stick with it."

Read More The oil bottom is in when the handcuffs come out

In late 1985, oil prices slumped to $10 from around $30 over five months as OPEC raised output to regain market share following an increase in non-OPEC production.

"Weighing on prices is the continued ample supply with crude oil builds in the U.S. and OPEC pumping at record levels," said Michael Poulsen at Global Risk Management. "Fear of slowing growth in China is increasing."

The dollar fell on receding expectations of a U.S. interest rate rise in September, providing some support for oil.

But technical price charts for almost all the big oil futures markets looked bearish, PVM's Bieber said.

"The only silver lining we are seeing coming from the United States is that refining rates remain high and that crude production continues to fall," Daniel Ang at Singapore-based Philip Futures said.