Leave supporters cheer results at a Leave.eu party after polling stations closed in the EU referendum on 23 June 2016.
Photograph: Toby Melville/Reuters

This article is the subject of a legal complaint on behalf of Cambridge Analytica LLC and SCL Elections Limited.

The US billionaire who helped bankroll Donald Trump’s campaign for the presidency played a key role in the campaign for Britain to leave the EU, the Observer has learned.

It has emerged that Robert Mercer, a hedge-fund billionaire, who helped to finance the Trump campaign and who was revealed this weekend as one of the owners of the rightwing Breitbart News Network, is a long-time friend of Nigel Farage. He directed his data analytics firm to provide expert advice to the Leave campaign on how to target swing voters via Facebook – a donation of services that was not declared to the electoral commission.

Robert Mercer: the big data billionaire waging war on mainstream media

Read more

Cambridge Analytica, an offshoot of a British company, SCL Group, which has 25 years’ experience in military disinformation campaigns and “election management”, claims to use cutting-edge technology to build intimate psychometric profiles of voters to find and target their emotional triggers. Trump’s team paid the firm more than $6m (£4.8m) to target swing voters, and it has now emerged that Mercer also introduced the firm – in which he has a major stake – to Farage.

The communications director of Leave.eu, Andy Wigmore, told the Observer that the longstanding friendship between Nigel Farage and the Mercer family led Mercer to offer his help – free – to the Brexit campaign because of their shared goals. Wigmore said that he introduced Farage and Leave.eu to Cambridge Analytica: “They were happy to help. Because Nigel is a good friend of the Mercers. And Mercer introduced them to us. He said, ‘Here’s this company we think may be useful to you’. What they were trying to do in the US and what we were trying to do had massive parallels. We shared a lot of information.”

The strategy involved harvesting data from people’s Facebook and other social media profiles and then using machine learning to “spread” through their networks. Wigmore admitted the technology and the level of information it gathered from people was “creepy”. He said the campaign used this information, combined with artificial intelligence, to decide who to target with highly individualised advertisements and had built a database of more than a million people, based on advice Cambridge Analytica supplied. Two weeks ago Arron Banks, Leave.eu’s founder, stated in a series of tweets that Gerry Gunster (Leave.eu’s pollster) and Cambridge Analytica with “world class” AI had helped them gain “unprecedented levels of engagement”. “AI won it for Leave,” he said.

By law, all donations of services-in-kind worth more than £7,500 must be reported to the electoral commission. A spokesman said that no donation from the company or Mercer to Leave.eu had been filed.

US hedge fund manager Robert Mercer, a long-time friend of Nigel Farage, is now known to be one of the owners of the Breitbart News Network. Photograph: USA/Rex

Brittany Kaiser, an employee of Cambridge Analytica/SCL, appeared on a panel at a Leave.eu press conference to explain the technology behind the campaign. And in documents Leave.eu filed with the commission, it reported that Cambridge Analytica was “a strategic partner”.The Observer reported in December that Cambridge Analytica had worked on the Leave campaign and received a letter from the campaign to say this was untrue. It later wrote to say: “It is a US company based in the US. It hasn’t worked in British politics.” It declined to comment last week on whether it had donated services to Leave.eu.

Leave.eu declined to say why it had not declared any donation of services to the electoral commission.

Mercer – and his daughter Rebekah – are emerging as key figures in the ascendancy of Trump and, as the Observer details today, the strategic disruption of the mainstream media. A brilliant computer scientist who did pioneering work at IBM in AI, Mercer made billions with Renaissance Technologies, a hedge-fund that specialises in automated trading. As well as financing Trump’s campaign, he encouraged Trump to take on two key advisers – Steve Bannon and Kellyanne Conway – and on Saturday the Washington Post revealed him as one of the owners of Breitbart. Bannon’s role within the Trump administration is being increasingly examined but, until now, Mercer’s connection has escaped the same sort of close scrutiny – particularly with regard to the media.

Breitbart, which has become the leading platform for the alt-right, is only one of a series of investments that aim to change the media landscape and political views not just in the US but also in Britain. A British version of Breitbart was launched in 2014, Bannon told the New York Times, explicitly to try to influence the upcoming general election. He and Farage have been close friends since at least 2012 and the site has been an important cheerleader for Ukip, with its editor, Raheem Kassam, at one point working as chief adviser to Farage.

Until now, however, it was not known that Mercer had explicitly tried to influence the outcome of the referendum. Drawing on Cambridge Analytica’s advice, Leave.eu built up a huge database of supporters creating detailed profiles of their lives through open-source data it harvested via Facebook. The campaign then sent thousands of different versions of advertisements to people depending on what it had learned of their personalities.

A leading expert on the impact of technology on elections called the relevation “extremely disturbing and quite sinister”. Martin Moore, of King’s College London, said that “undisclosed support-in-kind is extremely troubling. It undermines the whole basis of our electoral system, that we should have a level playing field”.

But details of how people were being targeted with this technology raised more serious questions, he said. “We have no idea what people were being shown or not, which makes it frankly sinister. Maybe it wasn’t, but we have no way of knowing. There is no possibility of public scrutiny. I find this extremely worrying and disturbing.”