Shares of energy companies fell after presidential candidate Joe Biden said he would gradually shift the U.S. away from fossil fuels, doubling down on a commitment to renewable energy.

Shares of major oil companies such as Exxon Mobil were down sharply. Rep. Xochitl Torres Small of oil-rich New Mexico, a Democrat, pushed back on Mr. Biden's pledge, saying the candidate was "out of touch" with reality.

Some oil companies have already pivoted, under pressure from activist investors concerned about their role in carbon emissions.

"Here's the thing about big oil, big oil itself is increasingly moving in a clean direction, as more and more endowments from universities and even the Rockefeller family are moving away from fossil fuel [investment]," said Quincy Krosby, chief market strategist at Prudential Financial.

Oil futures erased early gains to fall 1.3% to $40.12 a barrel on worries of a global oversupply after Libya's National Oil lifted a force majeure on its largest oil terminal, Es Sider, allowing it to restore production to a total of 1 million barrels of oil per day within four weeks.

The number of rigs drilling for oil in the U.S. rose by six in the latest week to 211, the highest level since May, according to oil-field services firm Baker Hughes.

Natural gas prices fell 1.2% to $2.97-per-million British thermal units, but notched a fifth straight weekly rise, ending this week 7% higher.

Write to Rob Curran at rob.curran@dowjones.com

(END) Dow Jones Newswires

10-23-20 1633ET