* TSX up 171.86 points, or 1.5 percent, at 11,596.56 * Energy stocks lead broad rally * RIM falls after earnings; new phones delayed By Allison Martell TORONTO, June 29 (Reuters) - Canada's main stock index rose in a broad rally on Friday after euro zone leaders agreed on measures to cut soaring borrowing costs in Italy and Spain and recapitalize banks, offsetting a sharp drop in Research in Motion Ltd. Oil and other commodities rose on news of the deal, which was seen as a sign the euro zone is adopting a more flexible approach to solving a debt crisis that has hampered global growth. "Expectations going into the summit were very low," said Elvis Picardo, strategist at Global Securities in Vancouver. "The feeling is that perhaps the EU (European Union) is taking the first concrete steps to actually come up with a solution to this whole mess." The Toronto Stock Exchange's S&P/TSX composite index closed up 171.86 points, or 1.5 percent, at 11,596.56. The index closed up 1.4 percent for the week, in large part because of Friday's move. The energy group played the biggest role in pulling the index higher, rising 2.8 percent as U.S. crude rose more than 9 percent, the biggest single-day percentage rise since March 12, 2009. "Positive news coming out of the European summit very late last night is pushing up ... global commodity prices, and also riskier assets such as equities," said Patricia Mohr, vice president, economics and commodity market specialist at Scotiabank. "I don't think the financial markets were expecting very much progress." Gold and copper rallied, and commodities were broadly higher. The Thomson Reuters-Jefferies CRB Index was up 4.6 percent. The heavyweight materials group, which includes gold and base metal miners, rose 2.2 percent, and financial issues rose 1.4 percent. Suncor Energy rose 4.0 percent to C$29.44, and Royal Bank of Canada was 1.9 percent higher. The stocks played the biggest role of any two companies in boosting the TSX. The only major TSX sector that did not rise was information technology, which was pulled lower by BlackBerry maker Research In Motion. The company's stock closed down 20.3 percent at C$7.54 after it reported a steeper-than-expected quarterly operating loss and deep job cuts, and delayed the make-or-break launch of its next-generation phones until next year. RIM did more than any other stock to keep the index from rising further. It was also the second most heavily traded stock on the exchange. In other company news, Canadian Pacific Railway Ltd named Hunter Harrison its chief executive, months after a boardroom shakeup triggered by William Ackman's Pershing Square Capital Management felled former CEO Fred Green. Its stock rose 1.6 percent to C$74.72.