* TSX rises 38.85 points, or 0.30 percent, to 12,801.15 * Five of 10 main index sectors climb * Potash jumps 3 percent, Agrium up 3.2 percent * CIBC, TD gain after companies discuss Aeroplan deal By John Tilak and Rod Nickel TORONTO, Aug 26 (Reuters) - Canada's main stock index hit a three-month high on Monday as a jump in grain prices and a gain in precious metals boosted shares of major fertilizer producers and gold miners. The market overcame data showing orders for long-lasting U.S. manufactured goods recorded their biggest drop in nearly a year in July, as well as news that Silvio Berlusconi's center-right party threatened to bring down the government over a vote to expel the former prime minister from parliament. North American fertilizer producers Potash Corp and Agrium Inc benefited from a spike in U.S. corn and soybean futures due to unfavorable hot and dry crop weather. Fertilizer stocks traditionally track prices of grain and oilseeds on the thinking that farmers tend to buy more fertilizer in periods of high crop prices to maximize production. Potash shares were the biggest contributor to the advance in the Toronto Stock Exchange's benchmark S&P/TSX composite index , according to Reuters data. The index was up 38.85 points, or 0.30 percent, at 12,801.15, its highest since May 22. Potash stock jumped 3 percent to C$32.30; Agrium was up 3.2 percent to C$93.93. Investors in the potash sector also digested news that the head of Russia's largest potash producer, Uralkali OAO , was detained in Belarus, escalating friction between the countries after the collapse of a joint sales pact in July. In the mining sector, Barrick Gold Corp added 2.5 percent to C$21.64, and Goldcorp Inc gained 1.5 percent to C$33.09 as U.S. gold futures firmed 0.2 percent, extending their 1.6 percent rally on Friday. Silver prices also rose, helping lift Silver Wheaton Corp up 4.1 percent to C$30.32. The recent recovery in various commodity prices, which took a tumble earlier this year, has helped the TSX outperform the S&P 500 in August to date. "It's a reflection of the fact that commodities have started to come off of their bottom," said Craig Fehr, Canadian market strategist at Edward Jones in St. Louis, Missouri. "We're starting to see a little bit of a rebound there." Financials, the index's most heavily weighted sector, rose 0.2 percent. After Canadian Imperial Bank of Commerce said it was still in talks to retain about half of its Aeroplan credit card portfolio after Toronto Dominion Bank replaced it as the issuer of the popular flight rewards card, shares of both companies gained. TD was up 0.5 percent at C$89.25, and CIBC added 0.6 percent to C$80.37. Shares of energy companies climbed 0.3 percent. Suncor Energy Inc added 0.7 percent to C$36.30.