(Reuters) - Canadian miner Timmins Gold Corp (TMM.TO: Quote) swung to a second-quarter profit as it sold more gold at higher prices.

The company posted a net profit of $3.6 million , or 3 cents a share, compared with a loss of $803,714, or 1 cent a share, in the year-ago period.

The company, which owns and operates the San Francisco gold mine in Mexico, reported a 43.8 percent rise in metal revenue at $28.2 million.

The company produced 17,287 ounces of gold during the second quarter, at an average realized gold price of $1,702 per ounce, up from 15,682 ounces of gold, at an average realized gold price of $1,227, a year ago.

Shares of the company closed at C$2.61 Tuesday on the Toronto Stock Exchange.

(Reporting by Maneesha Tiwari in Bangalore; Editing by Saumyadeb Chakrabarty)