THEY looked distinctly like G-men, except that they had the letters ICO emblazoned on their backs instead of FBI. On March 23rd 18 “enforcement” agents from the Information Commissioner’s Office launched an evening raid on the premises of Cambridge Analytica. Having combed through everything the last of them emerged only at 3am.

Visits from the heavy mob were supposed to happen to drug gangs, not nerdy analytics companies. But Cambridge Analytica is accused of harvesting the data of 50m Facebook profiles without permission, in order to microtarget voters for the presidential campaign of Donald Trump in 2016. The company has also been accused of breaking election laws in America that ban foreign citizens from participating. Facing several legal challenges, the company’s boss, Alexander Nix, has been suspended. There are doubts as to whether the firm can survive the storm.

But it is also a moment for the whole of Britain’s burgeoning data-analytics industry to take stock. Cambridge Analytica’s parent company, Strategy Communications Laboratories (SCL), was officially launched in 2005 and specialises in what it calls “behavioural-change programmes”. It has worked for the British and American governments, and other clients such as NATO, on initiatives to counter Islamist and Russian propaganda. SCL has deployed many of the techniques that London’s public-relations companies have used to influence elections overseas, but it has also used advanced data analytics, benefiting from being part of a London-based industry that lags behind only America’s in size and innovation.

PwC, a consultancy, estimated in 2016 that the data-analytics industry in Britain was already worth up to £500m ($700m), employing 6,700 people. It was also the fastest-growing bit of the market-research sector, having grown by 350% in the previous four years. PwC found that market research as a whole was worth as much as £4.8bn, already more than the PR and communications industry.

There are several reasons why London has become such an industry hub. In the slipstream of a strong advertising industry, the country developed an early lead in “ad tech”, the application of digital tools and analytics to inform marketing and advertising campaigns. Ad tech uses some of the same techniques to microtarget consumers that SCL used to microtarget voters. Meanwhile, data scientists are being churned out by British universities, especially University College London, Imperial College London and Cambridge University. As one of their number says, with academic jobs scarce and the City “uncool” after the financial crash, data-analytics companies are an obvious destination.

So far, data analytics have been lightly regulated. But that was due to change even before the rumpus over Cambridge Analytica. The ICO had already started an investigation into the use of data analytics for political purposes last year. Eileen Burbidge, chairwoman of Tech City, a government-backed initiative to promote the tech industry, observes that election rules have not been modernised for digital campaigns. “This is the most immediate area for reform,” she says. The government is also spending £9m on setting up a new centre for “data ethics and innovation”, which may propose new regulations.

But it is a new European directive, the General Data Protection Regulation, that will have the most immediate impact. This comes into effect in May, and will make it harder for companies to give information to third parties for unauthorised use. It might have prevented what happened at Cambridge Analytica.