TORONTO -- Energy stocks fell despite a rise in the price of oil, pulling the Toronto stock market into a modest loss on Wednesday.

The S&P/TSX composite index lost 4.41 points to end the day at 13,403.42, after a modest 25-point gain on Tuesday.

Energy and metals and mining were among the biggest losing issues on the TSX, with the energy sector down 0.9 per cent even as the January contract for benchmark crude oil rose 17 cents to US$43.04 a barrel.

The metals and mining sector fell 0.86 per cent.

Scott Guitard, portfolio manager at Fiduciary Trust Canada, said markets are returning the focus to economic news after the Paris terror attacks that killed 130 people and the ongoing crisis in Syria.

"Geopolitical risk has dominated the headlines over the past few weeks and markets, especially in Europe, have reacted to that," Guitard said.

"An ease in geopolitical tensions is generally positive for risk assets but on the other hand typically negative for energy prices," he said.

The oil-rich countries of the Middle East, including Saudi Arabia, Iran and Iraq, are facing a regional threat from the rise of the Islamic State terrorists.

Earlier today the U.S. government said crude oil stockpiles rose by one million barrels last week versus the small decline that had been expected by analysts.

Oilfield services company Baker Hughes Inc. also said the number of rigs exploring for oil and natural gas in the U.S. this week declined by 13 to 744. A declining rig count can boost oil prices because it means less future supply.

In New York, indexes were mixed in advance of the U.S. Thanksgiving holiday on Thursday, which will be followed by an abbreviated market session on Friday.

The Dow Jones industrial average closed slightly higher, up 1.2 points to 17,813.39, while the broader S&P 500 lost 0.27 of a point to 2,088.87 and the Nasdaq climbed 13.33 points to 5,116.14.

In the U.S., the Commerce Department said U.S. consumer spending edged up just 0.1 per cent in October after a similarly small gain in August.

That could signal trouble for the America economy given that consumer spending accounts for 70 per cent of gross domestic product. However, economists are counting on the strong labour market to bolster the incomes needed to fuel spending in the months ahead.

Elsewhere in commodities, January natural gas ended the day down 2.5 cents at US$2.299 per mmBtu, while December gold fell $3.80 to US$1,070 an ounce and December copper dropped almost nine tenths of a penny to US$2.05 a pound.

The Canadian dollar ticked up 0.07 of a U.S. cent to 75.21 cents U.S.

With files from The Associated Press