While the British intelligence agency GCHQ never wiretapped Donald Trump during his 2016 presidential campaign — despite what press secretary Sean Spicer claimed last month — it appears that British intelligence had known for a while that members of Trump's campaign team were interacting with Russian intelligence operatives.
They learned this because they were spying on those Russian agents anyway.
In late 2015, GCHQ learned about "interactions" between individuals connected to the Trump campaign and individuals who are known or suspected Russian agents, according to a report by The Guardian. The information was shared with the United States, and GCHQ's reporting was corroborated by information shared by other Western intelligence agencies through the summer of 2016.
Australia, Estonia, Germany and Poland were among the countries that passed on electronic intelligence, or sigint, to the United States on the Trump camp's connections to Russia. It was also possible that intelligence agents from France and the Netherlands shared comparable information with the United States. On all of these occasions, the goal was not to spy on Trump, but rather to keep tabs on Russian intelligence agents. When different agencies independently noticed a pattern, however, the American intelligence community was informed of the situation.
As one source told The Guardian, "It looks like the [US] agencies were asleep. They [the European agencies] were saying: 'There are contacts going on between people close to Mr Trump and people we believe are Russian intelligence agents. You should be wary of this.' The message was: ‘Watch out. There’s something not right here.’"