Cambridge Analytica, a political consultancy that worked for the Trump campaign and had come under attack for its use of personal Facebook data in other elections, announced Wednesday it would cease operations and declare bankruptcy in the United States and the United Kingdom.

The firm said it had lost clients because of revelations in March that it had improperly obtained the personal information of millions of Facebook users. “It is no longer viable to continue operating the business,” Cambridge Analytica said in a statement.

Cambridge Analytica defended its use of Facebook, saying it was “vilified for activities that are not only legal, but also widely accepted as a standard component of online advertising in both the political and commercial arenas.”

The decision by the firm comes as it continues to face potential investigations and sanctions from regulators around the world.

The controversial tactics of Cambridge Analytica — whose former vice president, Republican strategist Stephen K. Bannon, later worked for Trump’s campaign and in the White House — first came to light in March in news reports that it had amassed data from tens of millions of Americans through a Facebook quiz app. Facebook suspended the firm at the time.

In a statement Wednesday, Facebook said, “This doesn’t change our commitment and determination to understand exactly what happened and make sure it doesn’t happen again. We are continuing with our investigation in cooperation with the relevant authorities.”

Bannon, who later left the company, did not respond to requests for comment.

Critics of Cambridge Analytica and the largely unregulated use of personal data for political campaigns said the closing of the company will have little effect on the kinds of abuses that the company is alleged to have committed.

“The closing of Cambridge Analytica doesn’t stop the problem that voters and consumers face in terms of a growing loss of privacy and a gross misuse of their data,” said Jeff Chester of the Center for Digital Democracy. " Cambridge Analytica’s practices, although it crossed ethical boundaries, is really emblematic of how data driven digital marketing occurs worldwide. Americans are currently helpless to stop the massive flows of their personal information now regularly fed to Google, Facebook, ISPs and many others.”

Cambridge Analytica was born as an American offshoot of London-based SCL Group, whose affiliates had worked in campaigns around the world, including Kenya, Nigeria and India. Initial funding for Cambridge Analytica came from Republican financier Robert Mercer, who invested at least $10 million as it sought to help exclusively GOP candidates across a range of U.S. congressional and state legislative elections beginning in 2014. His daughter Rebekah Mercer was the company's president for a time. Neither Mercer responded to requests for comment Wednesday.

In 2014, Cambridge Analytica gained access to the Facebook data of tens of millions of people with a technique widely used during that time to collect information on Facebook users. Among its leading clients then was a super PAC controlled by Republican John Bolton, now Trump's national security adviser.

Designed by an outside researcher named Alexander Kogan, the tool, called ThisIsYourDigitalLife, collected information not only on Facebook users who approved it but also their friends. In total, Facebook has said that Cambridge Analytica had access to data on 87 million people, including 71 million Americans, in its efforts to create detailed profiles about voters’ backgrounds and behaviors, as well as what types of political messages might appeal to them based on their personalities.

Cambridge Analytica used this and other data — collected from data brokers and other sources — to fuel its Project Ripon, an effort to win Republican races that was named for the birthplace of the party, Ripon, Wisconsin. Former Cambridge Analytica employees have said that this work was done almost entirely in London, by people employed by the British-based SCL Group, and that some of these foreigners went to work directly on U.S. campaigns.

This practice raised questions about whether the company complied with federal election law that limits the roles played by non-U. S. citizens in American campaigns. An audit commissioned by the firm, published Wednesday, said there is “no evidence” that foreign held strategic roles in U.S. campaigns in violation of federal law. But it did acknowledge it was “possible” that parent company SCL “sent one or more persons abroad to help in elections in a non-strategic role, but on incorrect visas.”

In 2015, Facebook demanded that Cambridge Analytica delete all the data it had collected. But a former employee turned whistleblower, Christopher Wylie, alleged this year that the data analysis firm continued to rely on Facebook information despite assuring otherwise.

The controversy has triggered a groundswell of criticism, investigations into both Cambridge Analytica and Facebook around the world, multiple hearings in the U.S. Congress and the potential for fines and other penalties.

Adding to its headaches, Cambridge Analytica’s since-suspended chief executive, Alexander Nix, was caught on tape by a UK news broadcaster suggesting that the firm could use bribes and sex workers to entrap politicians it had hoped to defeat. Cambridge Analytica has denied the charges.

“Over the past several months, Cambridge Analytica has been the subject of numerous unfounded accusations and, despite the Company’s efforts to correct the record, has been vilified,” the firm said in a statement Wednesday.

Even as it maintained its innocence, Cambridge Analytica acknowledged that the “siege of media coverage has driven away virtually all of the Company’s customers and suppliers.” SCL and Cambridge Analytica began insolvency proceedings in the UK and said they would soon start bankruptcy proceedings in the United States.