(Repeats story published on Dec. 30 with no changes to text)
* UK M&A value down from 2015 but in trend
* Foreign buyers snap up UK companies with dollars
* Goldman, JPMorgan, Lazard top UK dealmaking league
* SoftBank-ARM, Twenty-First Century Fox-Sky top two deals
By Pamela Barbaglia and Guy Faulconbridge
LONDON, Dec 30 (Reuters) - Britain avoided a collapse inmergers and acquisitions activity after the shock Brexit vote asforeign companies used sterling's spectacular devaluationagainst the U.S. dollar to snap up British companies, ThomsonReuters data shows.
British M&A totalled $177.5 billion in 2016, down sharplyfrom the record $394.8 billion reached in 2015 - a year when theUK data was skewed by two of three biggest global deals - butwas in line with the longer 5-year trend.
Total annual mergers and acquisitions values averaged $139.3billion for the five years to the start of 2015. Britain alsoretained its place as the third largest M&A market after theUnited States and China.
Behind the headline numbers, there was another clear trend:foreign buyers - such as Rupert Murdoch's Twenty-First CenturyFox - shopping with dollars for bargains while domesticUK-to-UK dealmaking fell off sharply.
"Brexit should never have been talked up as an Armageddonmoment for UK M&A, especially with such a sharp devaluation inthe currency which has clearly been a stimulus for overseasbuyers," Tim Gee, London-based M&A partner at law firm Baker &McKenzie, told Reuters.
"Much of the activity in 2016 was skewed towards foreignbuyers with less UK-to-UK activity," Gee said. "Total activitylevels were not really knocked that much by Brexit but who wasdoing the buying did shift - deal values in 2016 are verysimilar to the historical trend."
Inbound M&A was $143.7 billion, again down from 2015 but wayabove the $85.9 billion annual average for the 5 years to 2015,while domestic M&A was $33.7 billion, down from an average of$53.4 billion over the same period.
There were just 1,355 domestic deals - the lowest figure innearly two decades of Thomson Reuters data.
2015 was a record year for dealmaking involving UK-listedcompanies thanks to a series of jumbo deals includingAnheuser-Busch Inbev's $110.3 billion acquisition ofSABMiller and Shell's $53 billion merger with BG Group.
BREXIT 'ARMAGEDDON'?
The June 23 vote took many investors and chief executives bysurprise, triggering the deepest political and financial turmoilin Britain since World War Two and the biggest ever one-day fallin sterling against the dollar.
On the day of the vote, sterling traded above $1.50 but isnow trading below $1.23 and fell below $1.15 at one point inOctober.
While opponents of leaving the EU had warned that the UnitedKingdom's economy would stall and investment stop if votersopted to exit, the data since the Brexit vote has shown theeconomy was resilient.
Just a week after Theresa May entered Downing Street toreplace David Cameron as British prime minister, Softbank founder Masayoshi Son made a $30.7 billion move forUK-based chip designer ARM Holdings.
"I am one of the first people to bet with a big size on theUK after Brexit," Son, who is ranked by Forbes as Japan's secondrichest man with a $14.9 fortune, told reporters in London atthe time. "Talking is easy. I am proving it...This is my bigbet."
The second biggest deal of the year was struck by Murdoch: a$14.6 billion deal to buy European pay-TV firm Sky.
People familiar with the matter told Reuters the Americanmedia corporation pounced after the Brexit vote sent the pounddown against the U.S. dollar and Sky's share price tumbling.
"The worst predictions surrounding Brexit and its potentialimpact on our economy have so far failed to materialize," DerekShakespeare, co-head of UK M&A at Barclays, told Reuters. "Withthe weaker pound UK businesses have become 10 to 20 percentcheaper."
"But the devil is in the detail: we have several years aheadof us to understand what the trading relationship with the EUwill look like. So there's a degree of caution when looking attransactions in Britain," he said.
"BREXIT MEANS BREXIT"
Goldman Sachs, the world's top dealmaker, was topagain in Britain's league tables, followed by JPMorgan and Lazard which rose to third place in Britain aboveDeutsche Bank, UBS, Centerview Partners LLC and Morgan Stanley, Thomson Reuters data showed.
"Geopolitical events such as Brexit have impacted CEOconfidence for deal-making over the first part of the year andthrough the summer," said Gilberto Pozzi, co-head of global M&Aat Goldman Sachs.
"We are now seeing a rebound in M&A activity although boardsremain quite cautious in reviewing the opportunities and thepros and cons of M&A transactions," Pozzi said.
Barclays' Shakespeare said many private equity funds haverecently sold assets and cashed out of high multiples thusboosting their ability to raise funds.
So what will happen in 2017?
Baker & McKenzie's Gee said he expected low levels ofactivity among financial institutions and basic materials,resources and commodities while M&A hot spots would includetechnology, innovation and healthcare.
"It will be a mildly better performance next year than thisyears with overall uptick in deal value," Gee said. "There is alimit to how long you can sit on your hands."
Prime Minister May, who has repeatedly used the example ofSoftbank's ARM purchase as evidence that investors are confidentin Britain, has promised to trigger formal Brexit talks by theend of March.
But May has given few details about what sort of exit dealshe will seek to negotiate.
"Investment coming into the UK is down amid uncertaintyaround Brexit and that uncertainty will linger into next year,"said Dwayne Lysaght, head of UK M&A at JP Morgan.
"That said, I think uncertainty is becoming the new norm,and the fundamentals for dealmaking remain intact," he said.
(Writing by Guy Faulconbridge; editing by Anna Willard)