TORONTO -- Investors expressed some nervousness ahead of the first U.S. presidential debate, as all major North American stock markets ended the day lower.

In New York, the Dow Jones industrial average retreated 166.62 points at 18,094.83, while the broader S&P 500 declined 18.59 points at 2,146.10. The Nasdaq composite lost 48.26 points at 5,257.49.

A record-breaking number of viewers are expected to tune into the 90-minute televised debate between Democrat candidate Hillary Clinton and Republican candidate Donald Trump tonight. The election, which is still six weeks away, is now considered a close race between the rivals.

In Toronto, the S&P/TSX composite index fell 78.47 points at 14,619.46, with declines being cushioned by gains in mining and energy stocks.

The Canadian dollar was at 75.55 cents US, down 0.37 of a cent.

In commodities, the November crude oil contract was up $1.45 at US$45.93 per barrel and November natural gas rose four cents to US$3.07 per mmBTU.

The December gold contract rose $2.40 to US$1,344.10 an ounce, while the December copper contract was unchanged at US$2.20 a pound.