TORONTO - The energy sector helped Canada's main stock index close higher, while U.S. markets were flat to lower amid rising trade tensions between the U.S. and China.

The S&P/TSX composite index closed up 69.21 points at 16,383.63 points.

In New York, the Dow Jones industrial average closed down 103.01 points at 24,987.47. The S&P 500 index was down 5.79 points at 2,773.87 and the Nasdaq composite index was up 0.65 of a point at 7,747.03.

The August crude contract closed up 84 cents at US$65.69 per barrel and the July natural gas contract ended down seven cents at US$2.95 per mmBTU.

The August gold contract ended up US$1.60 at US$1,280.10 an ounce and the July copper contract was down four cents at US$3.11 a pound.

Average numbers for the Canadian dollar were not available at the time of publishing.