Stock markets tumbled on Thursday, but the Toronto Stock Exchange’s main index fared better than its U.S. counterparts due to the strength of gold and other commodities.

The S&P/TSX composite index dropped 48.57 points to 15,033.64.

South of the border, the Dow Jones industrial average fell 274.14 points to 21,750.73, while the S&P 500 shed 38.10 points to 2,430.01. The Nasdaq composite slipped 123.20 points to 6,221.91.

“I think on a relative basis, Canada’s having, you know, actually quite a good day,” said Tim Morton, senior vice-president at TD Wealth.

The Toronto index saw some of its losses offset by gains in gold stocks — with the global gold sector leading the day’s performance.

The December gold contract climbed US$9.50 to US$1,292.40 an ounce.

Gold is seen as a safe haven for investors and they turned to the commodity as American indices dipped and reports came in of a terrorist attack in Spain. A van killed a dozen people and injured others when it drove into pedestrians at the Las Ramblas promenade frequented by tourists.

American markets took a bigger hit than in Canada partly because political noise out of the country continued to unnerve people slightly, said Morton.

He added the U.S. markets have had a strong year and sometimes need a rest or sell-off to remain grounded.

The Canadian dollar was trading at an average price of US79.07¢, up 0.32 of a U.S. cent.

The September crude contract advanced 31¢ to US$47.09 per barrel. The September natural gas contract was up US3.9¢ to about US$2.93 per mmBTU and the September copper contract fell US1.6¢ to US$2.94 a pound.