(Adds portfolio manager quotes and details throughout; updates prices)
* TSX ends down 34.8 points, or 0.23 percent, at 15,281.22
* Seven of the TSX's 10 main groups end lower
* Technology group declines 2.4 percent
By Fergal Smith
TORONTO, June 27 (Reuters) - Canada's benchmark stock index fell on Tuesday as technology and gold mining shares retreated, offsetting gains in the energy sector as oil prices climbed.
The Toronto Stock Exchange's S&P/TSX composite index closed down 34.8 points, or 0.23 percent, at 15,281.22.
"We are down a minor amount," said Ian Nakamoto, equity specialist at MacDougall, MacDougall & MacTier, a division of Raymond James. "Canada has lagged the U.S. by so much. There has to be a point in time ... where it is due for a catch-up."
The TSX is flat since the beginning of the year, while the S&P 500 has gained more than 8 percent.
But stocks on Wall Street fell broadly on Tuesday after a delay in a healthcare bill vote in the U.S. Senate raised fresh questions about the timeline of President Donald Trump's domestic agenda and as technology stocks lost ground under pressure from lofty valuations.
The lightly weighted technology group on the TSX retreated 2.4 percent. Constellation Software Inc declined 2.4 percent to C$695.24 and Shopify Inc fell 6.4 percent to C$114.37.
The materials group, including miners, lumber and fertilizer companies, lost 1.3 percent, with Agnico Eagle Mines Ltd sliding 3.1 percent to C$60.65 even as gold rose after hitting a six-week low in the previous session.
Magna was also influential on the downside, falling 2.8 percent to C$58.87. The overall consumer discretionary group, which includes the auto parts supplier, lost 1.3 percent.
Just three of the index's 10 main groups ended higher. Energy stocks led with a 0.7 percent rise as oil prices climbed.
U.S. crude oil futures settled 86 cents higher at $44.24 a barrel. Cenovus Energy rose 4.4 percent to C$9.55.
"There's got to be a bottom in terms of oil prices and oil equities. They've come down a lot," Nakamoto said.
The group has fallen nearly 22 percent this year.
The heavily weighted financials group edged 0.1 percent higher, helped by modest advances for some of Canada's largest banks.
Recent flattening in Canadian and U.S. yield curves had left investors worried that banks' net interest margins could be squeezed. But yield curves steepened on Tuesday after European Central Bank President Mario Draghi fueled expectations that the ECB was closer to announcing a reduction of stimulus. (Reporting by Solarina Ho; Editing by Jonathan Oatis and Richard Chang)