Facebook plunged to its worst loss in four years on Monday and led a rout in technology companies.

The social media company’s stock fell following reports that a data mining firm working for the Trump campaign improperly obtained data on 50 million Facebook users.

The drop came after the New York Times and the Guardian reported that the firm, Cambridge Analytica, tapped the profiles of more than 50 million users without their permission.

Legislators in the US and Europe criticised Facebook and said they want more information about what happened.

Investors wondered if companies like Facebook and Alphabet will face tighter regulation as a result.

Daniel Ives, chief strategy officer and head of technology research for GBH Insights, said Facebook is in a crisis and will have to work hard to reassure users, investors and governments.

“This is a defining moment for them,” he said. “It either becomes a blip on the radar and it helps the platform mature… or it becomes the start of something broader.”

Elsewhere, the British pound rose and European stocks slumped after Britain and the European Union said they were getting closer to a deal that will complete Britain’s departure from the EU in March 2019.

The S&P 500 index sank 39.09 points, or 1.4%, to 2,712.92. The benchmark index took its biggest loss since February 8 when it tumbled almost 4% as investors worried that rising inflation would slow the progress of the market and the US economy.

The Dow Jones industrial average fell 335.60 points, or 1.3%, to 24,610.91. During the day it fell as much as 493 points. The Nasdaq composite gave up 137.74 points, or 1.8%, to 7,344.24, and the Russell 2000 index of smaller company stocks declined 15.49 points, or 1%, to 1,570.56.

Larger technology companies including Apple and Microsoft fared worse than smaller ones. Another market favourite, Amazon, also dropped, and health care stocks fell more than the rest of the market.

The pound rose to 1.4050 dollars from 1.3938. The FTSE 100 index fell 1.7%, Germany’s Dax fell 1.4%, and France’s Cac-40 was 1.1% lower.

Facebook said late on Friday that it had suspended Cambridge Analytica and its parent company.

It said Cambridge obtained data from 270,000 people who downloaded a purported research app that was described as a personality test. A former employee said Cambridge got data from tens of millions of other users who were friends with the people who downloaded the app.

Facebook first learned of the breach more than two years ago but had not disclosed it. Facebook also said it recently received a report that Cambridge Analytica had not deleted all of the data it obtained from Facebook, something Facebook said the company claimed to have done.

Senator Amy Klobuchar said Facebook chief Mark Zuckerberg should testify before the Senate Judiciary Committee while legislators in Britain and the European Union also called for inquiries.

On Monday Facebook said it had hired an outside firm to audit Cambridge. Its stock sank 12.53 dollars, or 6.8%, to 172.56 dollars, its biggest one-day loss since March 2014.

Mr Ives said Wall Street is more concerned about the latest situation than it was about issues like Facebook’s platform spreading fake news, because Cambridge reportedly got access to the personal data of a large number of users, and the backlash suggests Facebook may face more regulation and could lose users, advertisers or advertising revenue.

He estimated that 5 billion dollars in annual revenue for Facebook might be at risk and said the situation could create problems for other tech companies, especially Twitter and Alphabet’s YouTube unit. Alphabet lost 34.35 dollars, or 3%, to 1,100.07 dollars.

Twenty-nine of the 30 Dow stocks finished the day with losses. The only exception was plane maker Boeing.

Bond prices gave up an early gain. The yield on the 10-year Treasury note remained at 2.85%.

Benchmark US crude fell 28 cents to 62.06 dollars a barrel in New York. Brent crude, used to price international oils, lost 16 cents to 66.05 dollars per barrel in London.

Wholesale petrol lost 2 cents to 1.92 dollars a gallon, heating oil remained at 1.91 dollars a gallon, and natural gas fell 4 cents to 2.65 dollars per 1,000 cubic feet.

Gold added 5.50 dollars to 1,317.80 an ounce, silver rose 5 cents to 16.33 dollars an ounce, and copper lost 2 cents to 3.08 dollars a pound.