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 per cent, 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 eight per cent.

But stocks on Wall Street fell broadly on Tuesday after a delay in a health-care 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 per cent. Constellation Software Inc declined 2.4 per cent to $695.24 and Shopify Inc fell 6.4 per cent to $114.37.

The materials group, including miners, lumber and fertilizer companies, lost 1.3 per cent, with Agnico Eagle Mines Ltd sliding 3.1 per cent to $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 per cent to $58.87. The overall consumer discretionary group, which includes the auto parts supplier, lost 1.3 per cent.

Just three of the index's 10 main groups ended higher. Energy stocks led with a 0.7-per-cent rise as oil prices climbed.

U.S. crude oil futures settled 86 cents US higher at US$44.24 a barrel. Cenovus Energy rose 4.4 per cent to $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 per cent this year.

The heavily weighted financials group edged 0.1 per cent 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.

U.S. MARKETS

The tech-heavy Nasdaq led a broad Wall Street decline on Tuesday with stocks falling more sharply after a healthcare bill was delayed in the U.S. Senate, raising fresh questions about President Trump's domestic agenda.

The benchmark S&P 500 posted its biggest one-day drop in about six weeks and closed at its lowest point since May 31.

Major indexes extended losses after U.S. Senate Republican leader Mitch McConnell decided to put off a planned vote on a bill to dismantle the Affordable Care Act until after the Senate's July 4 recess.

The health-care legislation, which has encountered resistance from several Republicans, is the first plank of Trump's domestic policy agenda, with investors eager for him to move onto his other plans including tax cuts, infrastructure spending and deregulation.

Promises for such domestic polices helped fuel a 13.1-per-cent rise for the benchmark S&P 500 since Trump's Nov. 8 election.

"The market likes certainty, and now there's uncertainty," said Peter Costa, president of trading firm Empire Executions in New York. "What is this going to look like when this gets out of the next iteration? That uncertainty I think is just having people pause a little bit."

"I also think that when the market gets to certain levels, any type of uncertainty, especially in anything that has to do with the administration, will have an adverse effect," Costa said.

The Dow Jones Industrial Average fell 98.89 points, or 0.46 per cent, to 21,310.66, the S&P 500 lost 19.69 points, or 0.81 per cent, to 2,419.38 and the Nasdaq Composite dropped 100.53 points, or 1.61 per cent, to 6,146.62.

Big tech names weighed most heavily on the S&P 500. Google parent Alphabet fell 2.5 per cent after EU antitrust regulators hit the tech giant with a record US$2.7-billion fine.

The Nasdaq had its worst day since a tech-led slide on June 9 raised questions about the sector.

On Tuesday, the tech sector pulled back 1.7 per cent. It remains the best-performing major group this year.

"There is some thinking that they ran up too quickly, and if there's an excuse to sell then we get some traders come in and sell into that weakness," said Bucky Hellwig, senior vice president at BB&T Wealth Management in Birmingham, Alabama.

The health-care sector weakened after news of the vote delay, and ended down 0.9 per cent.

Financials were the only sector to end in positive territory, rising 0.5 per cent.

Data showed consumer confidence for June rose more than expected, which could bolster the Fed's case for another rate hike this year.

Philadelphia Fed President Patrick Harker said the Fed rightly plans to raise rates once more this year, given recent inflation weakness is likely temporary.

U.S. Federal Reserve Chair Janet Yellen said she does not believe there will be another financial crisis for at least as long as she lives, thanks largely to reforms of the banking system since the 2007-09 crash.

Investors are gearing up for second-quarter corporate earnings season after a strong first quarter, with the S&P 500 trading at nearly 18 times forward earnings estimates, well above its long-term average of 15 times.

"On an earnings basis, the market appears to be fully valued and we need to see fiscal policy, tax and regulatory reform, to drive GDP growth and then stock prices," said Ernie Cecilia, chief investment officer of Bryn Mawr Trust in Bryn Mawr, Pennsylvania.

Declining issues outnumbered advancing ones on the NYSE by a 1.89-to-1 ratio; on Nasdaq, a 1.98-to-1 ratio favored decliners.