The lawsuit claimed that Facebook illegally shared user data with Cambridge Analytica.

The largest recovery ever achieved in a data privacy class action and the most Facebook has ever paid to resolve a private class action was disclosed in a court filing.

The settlement brings Meta a step closer to resolving the suit brought by Facebook users after it was revealed that the research firm connected to Donald Trump's 2016 campaign for president gained access to the data of 87 million of the social media network's subscribers. A federal judge must approve the agreement.

Lawyers for the consumers had been able to gain access to the company's internal records to back up their claims. Had the case gone to trial, the company could have been on the hook for hundreds of millions of dollars more.

Meta said in an email that it was in the best interest of the community and shareholders to pursue a settlement. The last three years have seen us change our approach to privacy. We want to continue to build services that people love and trust.

According to a court filing, Facebook has stopped allowing third parties to access data about users through their friends since the case was filed. According to the filing, the company has improved its methods for telling users what information Facebook collects and shares about them.

According to state officials, the largest privacy settlement in US history was reached by the 40 US states with the help of the internet search giant. A $90 million Meta deal to settle a suit over the use of browser cookies and Facebook's "Like" button has been approved by a judge.

In an August court filing, Meta said it had agreed to settle the Cambridge Analytica suit, but no terms were disclosed at the time. The Meta Chief Executive Officer would have to sit for as long as six hours to be questioned by the lawyers. According to the same filing, the former COO will have to testify.

Facebook said it disclosed its practices to users. It said that anyone sharing their information on a social network shouldn't worry about keeping their privacy.

The Cambridge Analytica privacy lawsuit has been filed by a person.

There is a case in the Northern District of California.

(Updates with Meta statement in fifth paragraph.)