A Washington federal judge on Monday handed Facebook a major victory in its battle against government regulators, dismissing two antitrust lawsuits against the social media giant and questioning assertions that Facebook is a monopoly.

In dismissing one of the lawsuits, U.S. District Judge James E. Boasberg said the Federal Trade Commission had failed to offer enough facts in its complaint to prove its assertion that Facebook controlled 60 percent of the social media market. He gave the agency 30 days to file an amended complaint with more details to bolster its case.

“It is almost as if the agency expects the Court to simply nod to the conventional wisdom that Facebook is a monopolist,” Boasberg wrote.

In the second lawsuit, the judge ruled that a group of state attorneys general had waited too long to challenge Facebook’s acquisition of the photo-sharing service Instagram and the messaging app WhatsApp, which the company bought in 2012 and 2014, respectively. That suit he dismissed outright, though he suggested in his opinion that the FTC may have the authority to file a similar case, if it chooses to do so.

Facebook’s stock soared following the news, and trading in the company closed Monday with its market capitalization exceeding $1 trillion for the first time in its history.

“We are pleased that today’s decisions recognize the defects in the government complaints filed against Facebook,” spokesman Christopher Sgro said in a statement. “We compete fairly every day to earn people’s time and attention and will continue to deliver great products for the people and businesses that use our services.”

The decision was a resounding blow to mounting efforts in Washington to undercut the power of tech giants and underscored the difficulties regulators will have reining in some of the most profitable businesses in the world. Those favoring action against Big Tech immediately denounced the decision, and some called for a rewrite of antitrust laws, which require a showing that a company is a monopoly before a case can be pursued.

“Today’s development in the FTC’s case against Facebook shows that antitrust reform is urgently needed,” Ken Buck (Colo.), the top Republican on the House Judiciary antitrust subcommittee, tweeted. “Congress needs to provide additional tools and resources to our antitrust enforcers to go after Big Tech companies engaging in anticompetitive conduct.”

Facebook has long argued that it is just one option in a burgeoning universe of social media companies, citing the rise of such services as TikTok, which claims 50 million daily users in the United States. In earning reports earlier this year, Twitter reported 38 million daily active users in the United States.

Facebook’s figures dwarf those, however, with the company reporting 195 million daily active users in the United States and Canada at the end of 2020.

The FTC sued Facebook in December, alleging that “no other social network of comparable scale exists in the United States.” The FTC alleged that Facebook has had monopoly power since at least 2011, but it defined the market Facebook monopolizes very narrowly, excluding professional social networks like LinkedIn and video streaming players such as YouTube.

The decision will force the newly Democratic-led FTC to revisit a case that was initially brought under Republican FTC Chairman Joe Simons, who was appointed by former president Donald Trump.

“The FTC is closely reviewing the opinion and assessing the best option forward,” Federal Trade Commission spokeswoman Lindsay Kryzak said in a statement.

The office of New York Attorney General Letitia James (D), who led the states’ lawsuit against the social network, said in a statement that it was “considering our legal options.”

In a colorful 53-page opinion, Boasberg made references to the 2010 film “The Social Network” about Facebook’s founding and noted that Facebook CEO Mark Zuckerberg was only a high school student during the federal government’s last major antitrust showdown, which targeted Microsoft.

The opinion highlighted the complexity of bringing antitrust cases against tech giants because the cases hinge on regulators proving a company monopolizes a market, yet there is intense debate about how to define what the market at stake is.

“The market-definition inquiry in this case is somewhat unusual because, unlike familiar consumer goods like tobacco or office supplies, there is no obvious or universally agreed-upon definition of just what a personal social networking service is,” Boasberg wrote.

Though the judge largely ruled in favor of Facebook, he did say he rejects the social network’s claims that the FTC lacked the proper authority to challenge its purchases of WhatsApp and Facebook. Whether that question might arise in subsequent litigation is up to the government, he said.

How to counter Facebook’s influence has been a major topic of interest in Washington since the 2016 presidential election, when the social media service became a conduit for Russian propaganda, and targeted advertising on its platform was widely credited with helping Trump win the presidency. Throughout the Trump administration, conservatives accused it of censoring their voices, even as liberals blasted it for allowing Trump to post misinformation and hate speech.

In a report that capped a 16-month investigation, the House’s top antitrust panel determined last year that Facebook “has monopoly power in the market for social networking.” The determination did not assign Facebook a direct market share figure, but rather relied on a combination of interviews with Facebook executives, outside reports from mobile app tracking firms, Facebook statements and company internal documents. In one 2012 internal document, Facebook said it controlled “95 percent of all social media.”

But Boasberg noted that none of that detail had been included in the FTC complaint. “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 antitrust product market,” he wrote.

The court’s decision is a major setback for the FTC, which has dedicated significant staffing and resources to probing Facebook’s power and privacy problems and highlights the uphill battle federal enforcers face in taking on some of the world’s most valuable companies.

“It should be a reminder of how hard these cases are going to be for the public agencies to succeed with,” said William E. Kovacic, a former Republican FTC chair and a professor at George Washington University Law School. “You might be in for a really long fight to get to the intended destination.”

Facebook’s defenders extolled Monday’s decision.

“Today’s decision by the D.C. District Court reinforces what every American already knows, that there is robust choice and competition online and on social media,” said Carl Szabo, vice president and general counsel at NetChoice, which counts Facebook as a member. “Activists might say we need new antitrust laws, but the Federal Trade Commission’s departure from tradition into subjective antitrust enforcement has illustrated the very need for our laws to continue to be applied objectively and fairly.”

The court’s decision is one of the first reprieves for the tech giant after a series of blows in Washington. Just last week, the House Judiciary Committee advanced several bills that would fundamentally alter the business practices of tech giants including Facebook. And earlier this month, President Biden named one of the industry’s top critics, Lina Khan, to head the FTC.

The court’s decision also foreshadows the challenges that Khan will face as she tries to usher in a new era of tougher antitrust enforcement. The U.S. judicial system for decades has maintained a fairly narrow view of what amounts to an antitrust harm.

The FTC should do everything possible to pursue this case,” said Sen. Amy Klobuchar (D-Minn.), who chairs the Senate Judiciary antitrust subcommittee. “But this ruling also illustrates precisely why our competition laws need to be updated — after decades of binding Supreme Court decisions that have weakened our antitrust policies, we cannot rely on our courts to keep our markets competitive, open, and fair.”