LONDON/FRANKFURT (Reuters) - The London Stock Exchange LSE.L has all but ended a planned merger with Deutsche Boerse DB1Gn.DE to create Europe's biggest exchange, which had faced growing opposition since Britain's vote to leave the European Union.

A demand from European antitrust regulators that it sell a trading platform in Italy was publicly ruled out by the LSE on Sunday, derailing the 29 billion euro ($31 billion) deal and knocking shares in both the LSE and Deutsche Boerse on Monday.

The LSE's decision not to sell MTS, which had been demanded in order to beef up smaller French rival Euronext ENX.PA, took the European Commission and Deutsche Boerse by surprise, people familiar with the matter said.

But the failure of the deal had been feared by many involved, amid growing calls from German politicians that the headquarters be shifted from London to Frankfurt because of Brexit - a concession the LSE did not want to make.

Further complicating the picture, German state prosecutors had opened an investigation into Deutsche Boerse Chief Executive Carsten Kengeter, who had been due to head the combined group, for possible insider trading. Kengeter denies any wrongdoing and no charges have been brought.

Nonetheless, the investigation strained already difficult relations, prompting the LSE to question Kengeter’s suitability to lead a combined company, two sources familiar with the matter said. LSE Chairman Donald Brydon wrote an email to Deutsche Boerse Chairman Joachim Faber in early February, shortly after prosecutors searched Kengeter’s apartment, expressing such reservations, the sources said. The LSE declined to comment.

The breakdown leaves a question mark over the strategy of the exchanges in London, Europe’s financial capital, and Frankfurt, the equivalent for Germany, the region’s biggest economy.

“Brexit changed everything,” said Bill Cash, a British Conservative lawmaker who backed Brexit and who led a parliamentary debate on the merger last week.

“It was inconceivable that after Brexit, having left the European Union, that our stock exchange would have been effectively run from Germany.”

Earlier this month, Kengeter had warned Frankfurt stood to lose out if the deal failed. “The biggest risk to Frankfurt ... is doing nothing,” he said.

Ingo Speich of Union Investment, a shareholder in Deutsche Boerse, said he was disappointed by the outcome.

“I’m certain that they have a Plan B to hand,” he said. “They will have to put something on the table to keep investors on side.”

David Moss of F&C Management said he expected “some of the other players initially mentioned as alternative suitors will be running the numbers again”.

Shares in Deutsche Boerse tumbled almost 5 percent, while LSE shares fell roughly 3 percent.

BREXIT ISOLATION

This is the latest in a series of doomed efforts at dealmaking by stock exchanges, highlighting the perils for any new buyer such as U.S. exchange ICE ICE.N.

There had already been five attempts, three public and two informal, to combine the London and Frankfurt bourses during the past decade, while the EU blocked a $17 billion tie-up between what was then NYSE Euronext and Deutsche Boerse in 2012.

A woman walks past the London Stock Exchange building in the City of London, Britain, January 16 , 2017. REUTERS/Toby Melville

The latest attempt came to an end when, in a highly unusual step, the LSE pre-empted a European Commission antitrust decision, saying it was unlikely to give clearance for the merger after the London bourse had refused to sell an electronic trading platform in Italy.

A deal would now only be possible if the Commission, which declined to comment, were to change its demands - an outcome that is unlikely given its approach to ruling on other mergers.

While hopes had been high, the plan to create what Kengeter dubbed a financial bridge between continental Europe and Britain had been called into question by Brexit.

Some economists think Britain’s departure from the EU may damage London as a financial center and that turned the tables in favor of Germany, prompting its politicians to demand Frankfurt not London be the headquarters of the combined group.

“They don’t want to be the first to send a clear signal that Brexit has unavoidable disadvantages for Britain,” Thomas Schaefer, the finance minister of the state of Hesse, home to Deutsche Boerse, told Reuters earlier this month.

Such German demands had grated with some lawmakers in Britain. By effectively pulling the plug now, the discussion does not arise.

The question over where the headquarters should be, which would have arisen had EU authorities given the deal a green light, worried LSE executives, two people familiar with the matter said.

But a source close to the LSE described the sale of fixed-income trading platform MTS as a key problem because such a move was firmly opposed by Rome.

“MTS has the largest chunk of Italian government bonds which made the Italian authorities wary of a change of ownership.”

Deutsche Boerse, however, said that decision not to sell MTS had been made by the LSE, adding it expected a decision by the Commission by the end of the month.

MTS is a small part of LSE’s business. It said it was nonetheless a major platform for trading European government bonds, particularly in Italy.