Crude prices soared Thursday after U.S. inventory data showed an unexpected drop in oil stockpiles, as energy stocks led gains on the Toronto Stock Exchange.

The October crude oil contract was up $2.12 at US$47.62 per barrel amid a report by the U.S. Energy Information Administration that said crude oil stockpiles fell by 14.5 million barrels last week  the biggest drop since 1999, according to the agency.

The decline came as a surprise because analysts had been expecting an increase.

The drawdown was partly blamed on Tropical Storm Hermine, which hit the U.S. Gulf Coast last week, limiting imports in the region.

Often, oil prices gain when there are signs of lower supply even though the cause may be temporary, said Jillian Bryan, a portfolio manager and investment adviser at TD Wealth.

"From a simplistic perspective, there is a lot of oil in the world out there," she said.

Crude prices have rallied by 10 per cent in the past four sessions, but still remain under the US$50 a barrel range seen in recent weeks.

Meanwhile, the strength in energy was not enough to move the S&P/TSX composite index by much, due to weakness in nearly all other sectors.

The Toronto stock market added on a mere 6.51 points at 14,803.26.

The energy sector led advances, by jumping nearly two per cent, while the gold and materials sectors led decliners on the TSX by pulling back 1.82 per cent and 1.26 per cent, respectively.

The higher oil prices also had little impact on the Canadian dollar, which was down 0.17 of a cent at 77.35 cents US.

In New York, major indexes were down, with the Dow Jones industrial average dipping 46.23 points at 18,479.91, while the broader S&P 500 fell 4.86 points to 2,181.30.

The Nasdaq composite lost 24.45 points at 5,259.48.

In economic news, the European Central Bank decided to leave its key interest rates unchanged and surprised the markets by saying that it would not extend the duration of its bond-buying stimulus program.

"If they're announcing they're not extending their quantitative easing program, obviously they're seeing a glimmer of hope over there," said Bryan.

At a news conference, ECB President Mario Draghi seemed relatively confident about the economy and less inclined to hint at more stimulus than some analysts had expected.

In commodities, October natural gas was up 13 cents at US$2.81, December gold contract was down $7.60 at US$1,341.60 an ounce and December copper contracts were unchanged at US$2.10 a pound.