Facebook Inc. shares are on pace to post their largest percentage decline in four years, as the company comes under fire from regulators for allowing a third-party group to access user information without those people’s permission.

The social-networking giant is facing its latest bout of scrutiny over the role third-party groups played in using Facebook’s FB, -1.73% platform during the 2016 presidential election. Regulators in the U.S. and U.K. have criticized the company for allowing Cambridge Analytica, a data firm that helped the Trump campaign, to access data on users without their express permission and hold that data for years despite saying that it had destroyed those records.

The stock plunged 6.8% in midday trading Monday. That would be the biggest one-day percentage decline since it tumbled 6.9% on march 26, 2014. The price decline of $12.53 would be the biggest since Facebook went public in May 2012.

Monday’s rout has wiped away almost $40 billion in market value from Friday’s close of $537.67 billion. The stock closed right at its 200-day moving average, a closely watched trend tracker that currently extends to $172.54, according to FactSet.

Many analysts acknowledged that the latest episode represents a public relations and regulatory risk to Facebook, though they were divided on the company’s ability to weather such challenges.

“It appears that data access by the original app developer was properly permissioned (i.e., this was not a ‘breach’ per se) and we note that Facebook has since upgraded its user privacy functionality and app review process to prevent similar abuse,” wrote Wells Fargo analysts led by Peter Stabler. “Nonetheless, this episode appears likely to create another and potentially more serious public relations ‘black eye’ for the company and could lead to additional regulatory scrutiny.”

Wells Fargo has a buy rating on the stock and a $230 price target.

GBH Insights analyst Daniel Ives commented that this new wave of scrutiny could prompt Facebook to make additional tweaks to its news feed and broader platform. “It’s clear with more ‘heat in the kitchen from the Beltway’ that further modest changes to their business model around advertising and news feeds/content could be in store over the next 12 to 18 months,” he wrote.

Facebook announced at the start of the year that it would begin to prioritize content from friends and family members over content from publishers, and the company said on its latest earnings call that changes intended to de-emphasize viral videos had resulted in users spending 50 million fewer hours per day on the platform. Facebook has been able to overcome such issues so far, posting strong growth despite significant increases in ad prices.

Ives believes that Facebook “can keep regulators at bay” through investments in security, screening, and artificial intelligence but thinks that the next few weeks will require Facebook to “hand hold and assure its users and regulators around tighter content standards and platform security.” Ives rates Facebook stock “highly attractive” and has a $225 price target.

Pivotal Research Group analyst Brian Wieser, one of just two analysts with a sell rating on the stock, said he does not expect the latest revelations to pose a near-term risk for Facebook.

“This episode is another indication of systemic problems at Facebook, although the company’s business won’t likely be meaningfully impacted for now because we don’t think advertisers will suddenly change the trajectory of their spending growth on the platform,” Wieser wrote. The company may face “enhanced” risk now, from a regulatory perspective and in terms of what it allows third-parties to measure, according to Wieser. He thinks advertisers may grow frustrated if Facebook begins restricting various types of measurements.

Stifel analyst Scott Devitt said Facebook hasn’t moved swiftly enough to address security concerns about its platform and that the company has been too quick to brush off concerns from critics. He believes the changes Facebook needs to make to restore user trust and tackle these security issues could “ultimately lead to lower engagement and negative monetization implications.” Devitt rates the stock at hold with a $195 target.

Facebook’s debacle helped push the broader tech sector XLK, +0.83% lower. Shares of Twitter Inc. TWTR, -0.62% were down 1.7%, while shares of Snap Inc. have lost 3.4% SNAP, +0.25% and shares of Alphabet Inc. GOOGL, -1.44% were off 3%.

The Nasdaq Composite Index COMP, -0.13% fell 1.8%, posting steeper losses than the Dow Jones Industrial Average DJIA, -1.84% and S&P 500 SPX, -1.15% , each off 1.4%.