SAN FRANCISCO (AP) — Meta has prevailed over an existential challenge to its business that could have forced the tech giant to spin off Instagram and WhatsApp after a judge ruled that the company does not hold a monopoly in social networking.

U.S. District Judge James Boasberg issued his ruling after the historic antitrust trial wrapped up in late May. His decision runs in contrast to two separate rulings that branded Google an illegal monopoly in both search and online advertising, dealing regulatory blows to the tech industry that for years enjoyed nearly unbridled growth.

The Federal Trade Commission “continues to insist that Meta competes with the same old rivals it has for the last decade, that the company holds a monopoly among that small set, and that it maintained that monopoly through anticompetitive acquisitions,” Boasberg wrote in his ruling. “Whether or not Meta enjoyed monopoly power in the past, though, the agency must show that it continues to hold such power now. The Court’s verdict today determines that the FTC has not done so.”

The federal agency had argued that Meta maintained a monopoly by pursuing an expression CEO Mark Zuckerberg made in 2008: “‘It is better to buy than compete.’ True to that maxim, Facebook systematically has tracked potential rivals and acquired companies that it viewed as serious competitive threats.”

During his April testimony, Zuckerberg pushed back against claims that Facebook bought Instagram to neutralize a threat. In his line of questioning, FTC attorney Daniel Matheson repeatedly brought up emails — many of them more than a decade old — written by Zuckerberg and his associates before and after the acquisition of Instagram.

While acknowledging the documents, Zuckerberg has often sought to downplay the contents, saying he wrote the emails early in the acquisition process and that the notes did not fully capture the scope of his interest in the company. Yet the case was not about the acquisitions of Instagram and WhatsApp more than a decade ago, which the FTC approved at the time, but about whether Meta holds a monopoly now. Prosecutors, Boasberg wrote in the ruling, could only win if they proved “current or imminent legal violation.”

The FTC’s complaint said Facebook also enacted policies designed to make it difficult for smaller rivals to enter the market and “neutralize perceived competitive threats,” just as the world shifted its attention to mobile devices from desktop computers.

Meta said the decision “recognizes that Meta faces fierce competition.”

“Our products are beneficial for people and businesses and exemplify American innovation and economic growth. We look forward to continuing to partner with the Administration and to invest in America,” said Jennifer Newstead, chief legal officer, in a statement.

The social media landscape has changed so much since the FTC filed its lawsuit in 2020, Boasberg wrote, that each time the court examined Meta’s apps and competition, they changed. Two opinions to dismiss the case — filed in 2021 and 2022 — didn’t even mention popular social video platform TikTok.

“The landscape that existed only five years ago when the Federal Trade Commission brought this antitrust suit has changed markedly. While it once might have made sense to partition apps into separate markets of social networking and social media, that wall has since broken down,” he wrote.

Emarketer analyst Minda Smiley said Meta’s win “is not necessarily surprising considering the lengths it’s gone to in recent years to keep up with TikTok.”

“But from a regulatory standpoint, Meta is far from out of the woods: Next year, major social networks will face landmark trials in the U.S. regarding children’s mental health,” she added. “Still, today’s win is surely a boost for the company as it battles criticism and questions over how its massive AI spending will ultimately benefit Meta in the long run.”