The London Stock Exchange agreed to buy Canada's stock market operator TMX, while Germany's Deutsche Boerse was in talks to buy NYSE Euronext, signaling that exchanges globally are looking to consolidate.

The combined LSE and TMX would be the world's fourth-largest exchange and a top center for trading mining and energy shares, with $4.1 trillion of stock changing hands a year. The exchanges are looking to regain market share lost to upstart electronic trading platforms.

Other exchanges could face similar pressures. Two sources familiar with the matter said New York Stock Exchange operator NYSE Euronext is in talks to sell itself to Germany's Deutsche Boerse. A deal would allow the companies to cut costs and dominate exchange trading in Continental Europe.

LSE shares rose 9 percent after its the TMX deal was announced. The rising share price signals LSE could be getting a good deal, which in turn could allow another buyer to offer a higher price for TMX.

If the combination survives likely political opposition in Canada, a group will emerge with a market value of 4.3 billion pounds ($6.9 billion) based on Tuesday's prices, with LSE shareholders holding 55 percent.

The deal indicates a valuation for TMX of C$46.7 per share, a 16 percent premium to its Tuesday close.

With Xavier Rolet at the helm, the LSE is fighting to win back market share lost to upstart rival trading platforms after Europe opened markets in 2007 to challenge incumbent exchanges long protected behind national boundaries.

The deal will put more pressure on bourses to seek partnerships to counter the threat from bigger rivals, with particular pressure on Deutsche Boerse, though remaining independent stock exchanges are scarce.

The big question in Europe is what about Deutsche Boerse, said a London-based banker familiar with the exchanges business, speaking on condition of anonymity.

The LSE's share of UK equity trading so far this month has been 54.9 percent, compared with 96.3 percent in February 2008, according to Thomson Reuters data. New entrants like BATS and Chi-X are rapidly gaining clout.

(Writing by Douwe Miedema; additional reporting by Victoria Howley and Sudip Kar-Gupta; Editing by Andrew Callus, David Cowell, John Wallace)

($1 = 0.6223 pound)