* TSX rises 40.87 points, or 0.32 percent, to 12,789.02 * Seven of 10 main sectors advance * Nexen gains 2 percent on U.S. regulator approval * TransCanada falls 1.4 percent after results By John Tilak TORONTO, Feb 12 Canada's main stock index closed higher on Tuesday, led by an energy sector supported by higher oil prices and a gain in Nexen Inc after U.S. regulators approved a $15.1 billion takeover of the oil and gas company. Investors were also focused on events such as the upcoming G7 meeting and the State of the Union address by President Barack Obama, who is expected to touch on improving jobs and economic growth. The Group of Seven industrialized nations urged countries to refrain from competitive devaluations, while the market waited for this evening's State of the Union address to look for any signs lawmakers are getting closer to a deal to avert automatic spending cuts that take effect on March 1. Calgary, Alberta-based Nexen said the Committee on Foreign Investment in the United States approved the takeover of the company by China's state-owned CNOOC Ltd, removing the final barrier to China's largest foreign takeover. Nexen rose 2 percent to C$27.48. "People don't want to see too many snags. You want to see M&A go through," said Irwin Michael, portfolio manager at ABC Funds. "If it does go through, it will encourage others to come in and look for companies." The Toronto Stock Exchange's S&P/TSX composite index unofficially closed 40.87 points, or 0.32 percent, higher at 12,789.02. Seven of the 10 main sectors on the index advanced. The energy sector, which gained 1 percent, was also supported by higher oil prices, which rose on increased forecasts for demand growth. Canadian Natural Resources Ltd rose 3.4 percent to C$31.55 and played the biggest role of any single stock in leading the market higher. However, TransCanada Corp shares slipped 1.4 percent to C$47.56 after it reported a 19 percent fall in fourth-quarter profit due to lower earnings from its power business and reduced contributions from some natural gas pipelines. In other company news, Agrium Inc appointed two independent directors to its board after the Canadian fertilizer maker could not come to terms with U.S. activist shareholder Jana Partners, which wants to break up the company. The stock fell 2 percent to C$112.71. The financial sector, the index's weightiest, added 0.1 percent. Manulife Financial Corp was up 0.8 percent, at C$15.40. There is a gradual flow of funds moving toward banks and asset managers and away from gold stocks and some material shares, said Sid Mokhtari, market technician and director, institutional equity research, CIBC World Markets.