Gold miners also weighed as the precious metal eased on a strengthening U.S. dollar.

The energy group climbed 0.5 percent as oil prices pushed higher, with pipeline operator Enbridge Inc (>> Enbridge Inc) adding 1.6 percent to C$50.18 and rival TransCanada (>> TransCanada Corporation) up 1.1 percent to C$62.61. Major producer Suncor Energy Inc (>> Suncor Energy Inc.) rose 0.4 percent to C$39.04.

The energy sector, which accounts for one-fifth of the index, has weighed heavily on it so far this year, having fallen almost 25 percent.

"We're seeing some negative rotation outgoing from banks, surprisingly finding some homes in the energy complex," said Sid Mokhtari, market technician and director of institutional equity research at CIBC World Markets. "Going into its earnings season investors are nervous about banks."

Toronto-Dominion Bank slipped 0.2 percent to C$64.28 and Bank of Montreal (>> Bank of Montreal) came off 0.2 percent to C$91.63. TD said its investment banking would expand in Dublin in response to uncertainty triggered by Brexit.

Mokhtari said he expects banks to dip further with uninspiring earnings, due next week, and would look to buy into the sector at that point.

The Toronto Stock Exchange's S&P/TSX composite index <.GSPTSE> ended up 33.08 points, or 0.22 percent, at 14,984.96.

Eight of the index's 10 main groups were in positive territory.

Consumer discretionary stocks gained 0.8 percent overall, as Statistics Canada reported that retail sales hit a record C$48.99 billion in June and were up in six of the 11 sectors. They grew by 1.1 percent when weak auto sales and lower gasoline prices were excluded.

Fast food company Restaurant Brands International (>> Restaurant Brands International Inc) rose 2.4 percent to C$78.06 and auto parts maker Magna International Inc (>> Magna International Inc.) added 1.7 percent to C$59.36.

The materials group, which includes base and precious metal miners as well as fertilizer companies, lost 0.5 percent overall as gold prices fell. [GOL/]

Wheaton Precious Metals Corp (>> Wheaton Precious Metals Corp) was down 1.6 percent at C$23.75, and Kinross Gold Corp (>> Kinross Gold Corporation) lost 2.4 percent to C$5.24, while fertilizer company Agrium Inc (>> Agrium Inc.) shed 1.2 percent to C$121.31 and Potash Corp of Saskatchewan (>> Potash Corporation of Saskatchewan Inc) fell 1 percent to C$21.59.

(Reporting by Alastair Sharp; Editing by Phil Berlowitz)

By Alastair Sharp