* TSX closes 0.3% higher

* Energy shares gain

* Constellation Software hits record high after results

Nov 10 (Reuters) - Canada's main stock index reversed course to close higher on Friday, helped by a boost in energy stocks as oil prices gained.

The Toronto Stock Exchange's S&P/TSX composite index closed up 67.06 points, or 0.34%, at 19,654.47.

Still, the index closed lower for the week after posting the biggest weekly jump since April 2020 in the previous week.

The energy sector ended up 1.7% after the price of oil gained about 2% as Iraq voiced support for OPEC+'s oil cuts ahead of a meeting in two weeks.

"Oil was having a nice bounce today. It has clearly been under pressure for the last week ... that has got all the big cap energy stocks up," said Mike Archibald, a portfolio manager at AGF Investments.

Technology stocks were also among the big gainers, up 1.9%, as Constellation Software shares rose 3.7% to hit a record high following upbeat results and Shopify added 1.6%.

"Technology names in the U.S. and in Canada are breaking out again here and certainly look like potential for market leadership going forward," Archibald said.

The materials sector, which includes precious and base metals miners and fertilizer companies, slipped 0.7%, as prices of most nonferrous metals fell after hawkish comments by the U.S. Federal Reserve Chair Jerome Powell signaled chances of another rate hike.

A 3.3% decline in First Quantum shares also weighed on the materials index. Chinese copper miner Jiangxi Copper has increased its stake in the Canadian miner to 18.5% from 18.3%.

Altus Group tumbled 21.8% to the bottom of the TSX, after the real estate fund intelligence provider reported lower-than-expected third-quarter results.

That dragged the broader real estate index down 0.6%.

Quebecor led gains on the capped communication services index with a 2.5% rise, after the telecom firm posted a rise in third-quarter profit. (Reporting by Nivedita Balu in Toronto and Khushi Singh in Bengaluru Editing by Shilpi Majumdar and Matthew Lewis)