The stock market value of Facebook has topped $1 trillion for the first time after the tech giant won a court victory against US regulators.
A federal court dismissed two lawsuits, from the Federal Trade Commission (FTC) and a coalition of states, sending Facebook shares up 4.2%.
It took the value of Facebook above $1tn, making it the last of the "big five" tech firms to hit the milestone.
The legal actions had accused Facebook of stifling competition.
But Judge James Boasberg ruled that the FTC's anti-trust complaint against the social networking giant was too vague.
Another separate anti-competition lawsuit filed by a group of 46 states was thrown out because the alleged violations occurred too long ago.
In the US District Court for the District of Columbia ruling, Judge Boasberg wrote that the FTC's complaint was "legally insufficient" and had to be dismissed, because the FTC had "failed to plead enough facts" to back up its claim that Facebook was stifling competition.
The FTC's lawsuit had requested that the technology giant, which also owns Instagram and WhatsApp, be broken up.
"The FTC's complaint says almost nothing concrete on the key question of how much power Facebook actually had, and still has, in a properly defined anti-trust product market," wrote Judge Boasberg.
"It is almost as if the agency expects the court to simply nod to the conventional wisdom that Facebook is a monopolist."
While this is a setback for the FTC that some analysts say could have repercussions for the future of anti-competition law in the US, the watchdog can re-file the charges and has until 28 July to do so.
However, investors saw it as an important victory for Facebook, sending the share price higher. The values of the other tech giants - Apple, Google-owner Alphabet, Microsoft, and Amazon - have already topped $1tn.
'Doing nothing over the the last half decade'
Separately, Judge Boasberg also dismissed an anti-competition lawsuit brought by a coalition of 45 US states together with the FTC.
This lawsuit had also sought to force Facebook to divest Instagram and WhatsApp. It related to Facebook's acquisition of the two apps in 2012 and 2014.
In March, Facebook petitioned the federal court in the US to dismiss them, describing the FTC complaint as "nonsensical".
The firm said the FTC's case "ignores the reality of the dynamic, intensely competitive high-tech industry in which Facebook operates".
In his ruling on this case, Judge Boasberg said that the states did not provide "a reasonable justification" for why they had waited between six to eight years to decide to sue Facebook - an argument the social networking giant previously made.
He added that the states had failed to provide "a factual dispute" and only gave a "half-hearted contention that Facebook was not prejudiced but rather 'benefitted from the states not filing sooner', since it has been and remains a very profitable company".
"Ultimately, this anti-trust action is premised on public, high-profile conduct, nearly all of which occurred over six years ago - before the launch of the Apple Watch or Alexa or Periscope, when Kevin Durant still played for the Oklahoma City Thunder and when Ebola was the virus dominating headlines," wrote Judge Boasberg.
He added that the states' allegations made it clear that the lawsuit could easily have been filed between 2012 and 2014: "The system of anti-trust enforcement that Congress has established does not exempt plaintiffs here from 'the consequences of [their] choice' to do nothing over the last half decade. "