NEW YORK (AP) _ Energy prices rose Thursday with help from surging gasoline futures, but crude oil stopped short of its recent peak of $24 a barrel.

Light sweet crude for delivery in November settled at $23.93 per barrel, up 26 cents, at the New York Mercantile Exchange. That erased crude's loss of 19 cents on Wednesday, resuming a rally that has pushed oil up by $1.72 a barrel over the past three weeks.

Unleaded gasoline for delivery in November settled at 64.50 cents a gallon, up 1.24 cents. Home heating oil for delivery in November settled at 69.40 cents a gallon, up .96 cent.

The market has been advancing on fears of supply disruptions this winter in the Soviet Union, the world's largest oil producer and a vital exporter to Europe. Soviet production has been in a steep decline, and its uncertain political future has stirred concerns about further drops in output.

''The crude oil tried to make another run for $24,'' said Tim Beggans, an oil broker at Dean Witter Reynolds Inc. ''We haven't been able to get above that.''

That elusive mark, hit briefly on Wednesday, was crude's highest price since January.

Still, oil has refused to retreat from territory unseen since the early days of the Gulf War. Before that, oil was last trading in this range during the sharp cold snap of December 1989 and January 1990.

Much of the market's motivation on Thursday came from rising gasoline futures, which were set into motion on reports that the U.S. supply fell sharply and unexpectedly last week.

''Gasoline is the real story today,'' said Victor Yu, vice president of futures at the Nikkhah Energy Group of Refco Inc.

The rally was fueled by several reports of refinery fires, although they either turned out to be unconfirmed or not as bad as initial rumors hitting the trading floor, Yu said.

News that North Sea oil shipments would be delayed by 36 to 48 hours because of rising seas was also giving energy prices a boost.

Natural gas prices were mostly higher, with contracts for delivery in November settling at $20.14 per 1,000 cubic feet, up 1.3 cents.

In London, North Sea Brent Blend crude oil for delivery in December settled at $22.42 per barrel, up 27 cents, at the International Petroleum Exchange.