A U.S. district judge in the District of Columbia signed off on a historic settlement Thursday, putting an end to 8-year-old litigation between the Federal Trade Commission (FTC) and Facebook.

The FTC sued Facebook back in 2012 over eight privacy violations, saying that Facebook made deceptive claims about users’ ability to control their personal data. The FTC alleged that Facebook misled its users into using default settings that weren’t nearly as private as users believed they were. Also in 2012, Facebook was ordered to make remedial changes; then, it allegedly violated that order – which resulted in yet more litigation with the FTC.

To settle the current litigation, Facebook agreed that it would not make misrepresentations about data security and would implement a new privacy program. The settlement also obligates Facebook to pay $5 billion in civil penalties; that penalty is significantly larger than the next-closest penalty the FTC has ever won–which topped out at $22.5 million.

The new finalized settlement between Facebook and the FTC is the product of lengthy netotiations between the parties – but still required court approval to take effect. As with all similar settlements, the court must declare the settlement fair, reasonable, and in the public interest – a relatively low bar. But Judge Timothy Kelly wasn’t as passive and detached as many judges are when approving a settlement. Kelly served up some harsh words for Facebook, warning the social media giant not to end up in his courtroom again.

”In the Court’s view, the unscrupulous way in which the United States alleges Facebook violated both the law and the administrative order is stunning,” Kelly wrote. The judge’s recitations of those allegations at length were not kind to Facebook:

The allegations in the Complaint reflect many ways in which Facebook purportedly acted improperly. Some of these allegations represent discrete and poorly considered decisions, such as allegedly encouraging users to provide phone numbers to better secure their accounts, but then using those same numbers for advertising without telling users beforehand. Others appear to reflect Facebook’s willingness to deceive its users outright, such as allegedly telling the public that it would not share their personal information with third parties when it was continuing to do so. And still others represent systemic oversight failures, such as allegedly allowing third parties to access users’ personal information without the users’ knowledge and without controlling how those third parties would use the information. Most of these allegations represent violations of the 2012 Order; several are new violations of law. But all of them suggest that the privacy-related decision making of Facebook’s executives was subject to grossly insufficient transparency and accountability.

Then came a stern warning: “In the event that the parties return to this Court because the United States alleges—once again—that Facebook has reneged on its promises and continued to violate the law or the terms of the amended administrative order, the Court may not apply quite the same deference to the terms of a proposed resolution.

In other words, this had better be the end of Facebook’s shenanigans, or the FTC won’t be the only one to drop the hammer.

But Kelly was also crystal clear that he thinks there are deeper problems that the legislative branch should considering solving.

“And these allegations, and the briefs of some amici, call into question the adequacy of laws governing how technology companies that collect and monetize Americans’ personal information must treat that information. But those concerns are largely for Congress; they are not relevant here,” the judge wrote.

[image via Johannes Simon/Getty Images]

Have a tip we should know? [email protected]