DEUTSCHE BANK AG and UniCredit SpA moved some of their swaps trades from London to Frankfurt in May as banks used a lull in the ongoing Brexit drama to prepare for the worst.

About 10 banks took part in a switching run where lenders closed existing swaps positions in the UK and opened equivalent ones in Germany, according to people familiar with the matter, who asked not to be named because the trades are private. Some of the 10, including JPMorgan Chase & Co. and Commerzbank AG, acted as market makers, treating the exercise as an opportunity to generate revenue by trading with the banks.

Continental European banks would be unable to keep their swaps — a widely used type of derivative — in London from April next year if the UK leaves the European Union without a deal. That could force the banks to move trillions of dollars of derivatives from LCH Ltd., a unit of London Stock Exchange Group Plc, to Frankfurt’s Eurex Clearing, part of Deutsche Boerse AG.

As well as helping Deutsche Boerse at the expense of LSE, such a move would erode London’s dominance as Europe’s financial center — and potentially roil the market for interest-rate swaps.

Deutsche Bank and UniCredit declined to comment, as did spokespeople for JPMorgan and Commerzbank. Bayerische Landesbank, which also shifted some swaps to Frankfurt, and the Bank of England, LCH’s primary regulator, also declined to comment.

Capitalab, a subsidiary of inter-dealer broker BGC Partners Inc., oversaw the switching exercise, which it intends to repeat once a month, said two of the people. The banks moved some of their longer-dated swaps, rather than just their short-term contracts, some of the people said.

A spokesman for BGC and a spokeswoman for LCH declined to comment. A spokeswoman for Eurex, which owns the only continental firm able to clear swap trades, also declined to comment.

LCH holds more than €100 billion ($112 billion) of cash and bonds on behalf of banks and fund managers seeking to protect their swap trades against the possibility that a major trading firm will default.

The European Commission saved LCH from having to kick out its EU-based clients at the end of last year when it extended the London-based clearinghouse’s right to provide services to continental firms until the end of March 2020. Banks can continue to buy and sell LCH-branded swaps even if the UK leaves the EU without a deal at the end of October — the current scheduled date for Brexit.

Unless the commission further extends LCH’s ability to serve EU banks, those firms will have to move their swaps positions somewhere else before April next year. — Bloomberg