TORONTO -- The energy sector weighed down Canada's main stock index Thursday and south of the border, the S&P 500 continued to finish the trading day tantalizingly close to an all-time high.

The S&P/TSX composite index lost 45.22 points to 16,530.06.

"The story today in the Canadian stock market is largely one of oil prices," said Candice Bangsund, portfolio manager for Fiera Capital.

The September crude contract retreated 43 cents to US$42.24 barrel.

The drop came after the International Energy Agency released a report reducing their outlook for global oil demand, she said.

The IEA expects global oil demand to be 91.9 millions of barrels per day this year, down 8.1 mb/d year over year, according to the report, which reduces the IAE's 2020 forecast by 140 thousand barrels per day. The report sites high COVID-19 case numbers that continue to stall mobility, as well as aviation sector weakness.

With the news weighing on crude prices, the energy sector on the TSX was the worst performer of the day. Shares in the sector fell, on average, by 1.57 per cent of their worth.

"In contrast, the more sombre mood in the market has bolstered gold prices and is boosting the materials sector," said Bangsund.

The December gold contract gained US$21.40 to US$1,970.40 an ounce during "a very turbulent week for gold prices," she said. On Tuesday, prices fell by US$93.40 for the steepest one-day drop in years.

The materials sector, which includes the big gold miners, was the best performing sector Thursday with shares gaining, on average, 2.48 per cent of their worth.

South of the border, market were mixed.

The Dow Jones industrial average fell 80.12 points to 27,896.72 and the S&P 500 index shed 6.92 points to 3,373.43. The S&P 500 remains close to its all-time closing high of 3,386.15 in February.

"Sentiment may be dwindling today as the stalled out negotiations for the next relief package in the U.S. may be curbing investor enthusiasm," said Bangsund.

Congress remained in a stalemate Thursday over a new coronavirus relief package, and talks are not expected to resume until Congress resumes in September. That leaves Americans without a continuation of the country's now-expired $600 weekly unemployment benefit and without the protection of a federal ban on evictions, among other things.

Meanwhile, the Nasdaq composite gained 30.26 points to 11,042.50.

The Canadian dollar traded for 75.66 cents US compared with 75.45 cents US on Wednesday.

Elsewhere in commodities, the September natural gas contract gained three cents to US$2.18 per mmBTU and the September copper contract fell about eight cents to nearly US$2.81 a pound.

This report by The Canadian Press was first published Aug. 13, 2020.