(Reuters) - Primero Mining (P.TO: Quote) posted a third-quarter profit, helped by strong gold prices, sending its shares up as much as 7 percent.

The spiraling euro zone debt crisis, a tepid economic recovery in North America and other factors lifted the price of gold -- often viewed as a safe-haven -- to an all-time high of $1,920.30 an ounce in September.

In the quarter, the company sold about 19,660 ounces of gold at an average price of $1,668 per ounce.

The price of gold averaged more than $1,700 an ounce in the quarter, up roughly 35 percent from a year earlier.

Toronto-based Primero reported the net income at 40 cents a share, compared with a loss of 68 cents a share, last year.

Primero, which owns the San Dimas gold-silver mine in Mexico, said it produced 27,450 gold equivalent ounces at a cash cost of $641 per gold equivalent ounce.

The company, which sells the bulk of the silver produced from San Dimas at well-below market prices under agreements it inherited with the acquisition of the mine, said revenue more than doubled to $46.1 million.

In September, the Mexico-focused gold miner cut its production outlook for 2011, hit by a month-long strike at its mine there and lower-than-expected gold grades.

Shares of the company rose to a near seven-week high of C$3.33 in morning trading on Friday on the Toronto Stock Exchange.

(Reporting by Ankur Banerjee in Bangalore; Editing by Maju Samuel)