TORONTO - The Toronto stock market closed slightly higher Thursday as fresh concerns about the U.S. economy lifted gold prices and bullion stocks and weakened base metal and energy stocks.

The S&P/TSX composite index moved 24.92 points higher to 11,945.97 while the TSX Venture Exchange was ahead 19.52 points at 1,481.38.

The Canadian dollar was down 0.15 of a cent to 97.37 cents US.

The TSX global gold sector was the biggest percentage advancer, as the August bullion contract on the New York Mercantile Exchange rose $18.20 to US$1,248.70 an ounce.

"We're fortunate in Canada to have a fairly big-sized index in gold stocks and that's certainly helping the TSX outperform most indexes globally," said Jean Francois Dion, portfolio adviser with Canadian Equities, RBC Dominion Securities.

"But yes, absolutely, there's a flight back to safety, there's a selloff in risky assets in general and commodities tend to get hit first when that happens."

Gold prices ran ahead as the U.S. Conference Board's gauge of future economic activity rose 0.4 per cent in May, signalling slow growth in the U.S. economy in the summer and fall, lower than the 0.5 per cent rise that had been expected.

The Philadelphia Federal Reserve reported that its manufacturing index fell from 21.4 in May to eight in June. Economists were expecting the index to strengthen to 22.

And U.S. weekly jobless insurance claims rose unexpectedly last week after falling three straight weeks.

"The leading indicators and Philly Fed survey kind of show that the optimism out there is fading a little bit to some extent," Dion said.

"It's probably early to conclude that, but there seem to be signs that the volatility in the market in general, the perceived risk in Europe, is having an impact on the real economy."

On the TSX, Barrick Gold Corp. (TSX:ABX) gained $1.76 to C$46.10 while Goldcorp Inc. (TSX:G) improved by $1.01 to C$46.15.

Gammon Gold Inc. (TSX:GAM) said it has suspended operations and fired 397 workers at its El Cubo mine in Mexico. The Halifax-based company will also file criminal charges against seven union executives. The company said it has experienced continued illegal labour disruptions at the mine and financial demands from the union that Gammon describes as "untenable." Its shares slipped 72 cents to $7.04.

The base metals sector led decliners, down 1.75 per cent as the poor U.S. data helped push the July copper contract in New York down nine cents to US$2.90 a pound. Quadra FNX Mining, which announced Wednesday that a Chinese company had pulled out of a joint venture, dipped 55 cents to C$11.93 while Teck Resources (TSX:TCK.B) lost 74 cents to C$35.43.

Copper had enjoyed a string of advances from last week when data showed a stronger than expected rise in Chinese exports, which in turn raised hopes for demand for the metal.

The energy sector was down 0.15 per cent as the July crude contract on the Nymex lost 88 cents to US$76.79 a barrel as confidence slipped that a three-week rally can continue amid signs of weak U.S. crude demand. Suncor Energy (TSX:SU) fell 16 cents to C$34.71 while Canadian Natural Resources (TSX:CNQ) lost 35 cents to C$37.56.

Some analysts don't expect the massive BP oil spill in the Gulf of Mexico to squeeze supplies any time soon.

New York markets also registered modest gains as the Dow Jones industrial average was ahead 24.71 points at 10,434.17.

The Nasdaq composite index gained 1.23 points to 2,307.16 while the S&P 500 headed 1.43 points higher to 1,116.04.

In other corporate news, Magna International Inc. (TSX:MG.A) released a CIBC World Markets report on its controversial share conversion plan, which says the auto parts giant's disclosure is "entirely appropriate" and minority shareholders have all information they need to evaluate the plan. Magna has offered to buy out founder Frank Stronach's controlling stake for US$863 million but the Ontario Securities Commission and some shareholders don't like the offer. Magna shares added six cents to $69.36.

On Thursday, shares in BP were down 14 cents at US$31.71 in New York after CEO Tony Hayward told a U.S. House panel that he was "deeply sorry" for the Gulf of Mexico rig explosion and oil spill.

Hayward's appearance on Capitol Hill came a day after BP agreed to put US$20 billion into a fund for victims of the spill and to suspend dividend payments for the rest of the year. The company's shares have lost about half their value since the rig explosion in April.

Patent licensing company Wi-LAN Inc. (TSX:WIN) said it has signed a six-year wireless patent licensing agreement with consumer electronics maker Sharp Corp. covering products like its Wi-Fi enabled laptops and mobile phone handsets. Wi-LAN shares ran ahead 10 cents to C$3.24.

Spain, which is fighting speculation it will need a bailout, has raised nearly euro3.5 billion or US$4.3 billion as investors snapped up a bond offering. However, the bonds were sold at sharply higher interest rates that indicate they still view government finances with skepticism.

Spain strongly denies reports that its troubled public finances and banks' credit problems are pushing it toward some sort of rescue similar to the one given to Greece by the European Union and the International Monetary fund.