Britain avoided a collapse in mergers and acquisitions activity after the shock Brexit vote as foreign companies used sterling's spectacular devaluation against the US dollar to snap up British companies, according to Thomson Reuters.

Its data show British M&A totalled €168.61 billion in 2016, down sharply from the record €375.04 billion reached in 2015 – a year when the UK data was skewed by two of three biggest global deals - but was in line with the longer five-year trend.

Total annual mergers and acquisitions values averaged €168.61 billion for the five years to the start of 2015.

Britain also retained its place as the third largest M&A market after the United States and China.

Behind the headline numbers, there was another clear trend: foreign buyers - such as Rupert Murdoch's Twenty-First Century Fox - shopping with dollars for bargains while domestic UK-to-UK dealmaking fell off sharply.

"Brexit should never have been talked up as an Armageddon moment for UK M&A, especially with such a sharp devaluation in the currency which has clearly been a stimulus for overseas buyers," Tim Gee, London-based M&A partner at law firm Baker & McKenzie, told Reuters.

"Much of the activity in 2016 was skewed towards foreign buyers with less UK-to-UK activity," Mr Gee said.

"Total activity levels were not really knocked that much by Brexit but who was doing the buying did shift - deal values in 2016 are very similar to the historical trend."

Inbound M&A was €1.36.51 billion, again down from 2015 but way above the €81.6 billion annual average for the five years to 2015, while domestic M&A was €32.01 billion, down from an average of €50.73 billion over the same period.

There were just 1,355 domestic deals - the lowest figure in nearly two decades of Thomson Reuters data.

2015 was a record year for dealmaking involving UK-listed companies thanks to a series of jumbo deals including Anheuser-Busch Inbev's €104.78 billion acquisition of SABMiller and Shell's €50.35 billion merger with BG Group.