Amid the battle over whether Chinese company Huawei’s technology should be allowed into 5G networks inside the U.S. and abroad, America’s home-grown 5G champion, Qualcomm, was dealt two major setbacks in the space of a week.

Qualcomm’s stock started to slide on Thursday, May 16, when the U.S. Commerce Department blocked it and other U.S. companies from selling components to Huawei. Then, late Tuesday, U.S. District Judge Lucy Koh ruled that Qualcomm had used its monopoly power to bully companies like Apple into overpaying for royalties on Qualcomm’s wireless inventions, ordering Qualcomm to renegotiate its business deals. Qualcomm said it plans to appeal the decision.

The fate of Qualcomm, which for two decades has been a global leader in developing new technology for wireless phones, has become something like a bellwether for U.S. wireless innovation, an important driver of economic growth. The current technology industry boom relied heavily on the expansion of fast wireless network connections, known as 4G or LTE, allowing people to hail rides with their phones and document their lives in real time on social media.

Now, as 5G promises ultrafast downloads and a new level of wireless speed and connectivity, Qualcomm is the only U.S. company making 5G chips for mobile phones, the components necessary to connect smartphones to cellular networks. The new generation of cell networks might create another round of innovation and economic growth as startups figure out how to use it in new products and spur the development of self-driving cars, smart appliances and remote medicine, which rely on stable web connections.

But while Qualcomm is accused of using its market dominance to gouge its customers, it has proved remarkably easy to knock down. When Apple sued in 2017, Qualcomm laid off 1,500 employees and slashed its research and development budget. It nearly shuttered after Broadcom launched a hostile takeover bid last year, aimed at chopping up Qualcomm and selling it for parts. That bid was thwarted when the White House stepped in and blocked it on national security grounds.

Adam Mossoff, a law professor at George Mason University, said the judge’s decision sends a bad message to innovators. He viewed the FTC’s case against Qualcomm as the result of Qualcomm’s competitors ganging up on it in order to reduce costs. The decision “has serious repercussions for the U.S. innovation economy, far beyond this situation,” he said.

The Federal Trade Commission, which brought the suit in 2017, called Koh’s decision “an important win for competition in a key segment of the economy.”

With the first wave of fifth-generation smartphones due later this year, wireless companies are jostling to bolster their 5G capabilities. By 2022, 5G cellular networks will power as much as 9 percent of mobile data connections across North America, according to a recent report from Cisco. U.S. officials have framed development of the technology as a race against China to dominate the next frontier of the commercial Internet. Whichever nation gains that advantage will largely shape — and benefit economically from — such add-ons as apps, services and other innovations, policy analysts say. When the United States took the lead on 4G mobile technology, for example, it gave rise to the app economy, which is still dominated by U.S. firms, according to Cisco.

But the ruling could upend Qualcomm’s business model, which relies not just on chip sales, but on royalty payments from a myriad of Qualcomm inventions that are incorporated into global wireless standards. In her ruling Tuesday, Koh said Qualcomm earned more than it should have on those royalty payments by threatening to stop selling chips to handset makers.

Qualcomm had denied using its chips as leverage for its licensing business, but Koh said in her ruling that she discounted the testimony of Qualcomm executives because they “lacked credibility,” citing contradictions between what they said at trial and their own notes and emails that surfaced during the discovery process.

The judgment comes a month after Qualcomm settled its dispute with Apple, ending years of litigation. The deal resolved all 80 lawsuits between them worldwide and included licensing and supply agreements. The legal battle stemmed from the iPhone maker’s allegation that Qualcomm abused its market position for wireless modem chips.

Qualcomm’s new agreement with Apple, signed as part of the settlement, addressed the same issues raised during the FTC trial, according to people familiar with the matter who did not want to be named because of the legally sensitive nature of the topic. It is unclear whether Koh’s ruling requires that case to be renegotiated. Apple did not respond to a request for comment.

On Wall Street, the settlement had been seen as a sign the FTC’s case against Qualcomm was weak, said Daniel Ives, an analyst at Wedbush Securities, making Tuesday’s ruling all the more surprising. “This is a gut punch for Qualcomm and could have a major ripple impact across the smartphone industry,” he said.

Qualcomm’s legal defeat may also carry foreign policy implications. The Trump administration has moved to limit China’s access to U.S. markets, especially in industries deemed vital to national security, such as telecommunications. Just last week, the White House placed Chinese telecom giant Huawei on a trade “blacklist.” But the Qualcomm decision may weaken the Huawei ban, Ives said, by giving Beijing leverage in the battle over smartphone chips.

“Qualcomm is dealt a blow with this FTC ruling as the main U.S. 5G arms dealer,” he said, while Huawei’s position is strengthened.

U.S. officials have come to view Qualcomm as an important cog in the U.S. technology landscape. With Intel’s withdrawal from the 5G chip market, Qualcomm is the only company in the space. In March 2018, the White House stepped in to block a takeover bid from Broadcom, citing national security concerns.

Earlier this month, the U.S. Department of Justice weighed in on the FTC’s dispute with Qualcomm, warning that without first holding hearings on the matter, an overly broad remedy from Koh could stymie innovation in the market for next-generation wireless technology.

But Koh wrote that potential resolutions had already been discussed during trial. Qualcomm must now negotiate or renegotiate its terms with customers without threatening to pull its chips or to impose discriminatory provisions, the ruling said, and make its licenses available to chip suppliers at “fair and reasonable” rates. It also must forgo the exclusive supply agreements it brokered with Apple and others, which tend to lock out market rivals.

The court ordered Qualcomm to undergo seven years of FTC monitoring to ensure its compliance. And the company is barred from interfering with customers who might want to report potential misconduct to a government agency.

“Qualcomm’s licensing practices have strangled competition” Koh wrote. The company’s leading position in the market for 5G wireless chips, she noted, makes the company’s illegal conduct likely to continue.

Koh seemed to take particular issue with Qualcomm’s royalty rates, which are based on the sale price of a smartphone. Qualcomm’s own documentation acknowledged that its chips don’t drive the value of a handset, she noted, yet the company continued to take the same 5 percent cut from customers despite its modem chip’s declining relevance. Koh found that Qualcomm used its dominant market position to extract billions of dollars from phone companies this way.

Royalties are generally based on the value of specific patented parts, not of the entire end-product. Koh ruled that Qualcomm’s use of a phone’s price as the royalty base is inconsistent with federal patent law.

Judge Koh’s ruling did not prohibit Qualcomm from negotiating future royalty rates that are based on the value of handsets.

Qualcomm said it will seek to put a hold on Koh’s ruling and move for an expedited appeal.

”We strongly disagree with the judge’s conclusions, her interpretation of the facts and her application of the law,” said Don Rosenberg, Qualcomm’s executive vice president and general counsel.

The ruling’s effect on Qualcomm’s business may not be clear for months or even years. It’s possible that Qualcomm’s customers will end up paying less for its patents and technology as a result.

However, even Apple acknowledged in its own internal documents that Qualcomm’s patent portfolio was of significant value, and it’s unlikely handset makers can avoid paying royalties to Qualcomm for using that technology.

George Hay, a former Department of Justice antitrust official, said Judge Koh’s ruling could have been much harsher. “You’re talking about changing some contracts,” he said. “It’s not going to change overnight.”

Another question is whether the market for wireless chips and technology will see an explosion of competition as a result of the ruling.

Companies like Intel have faced difficulties in developing the chips. Apple, for instance, reduced the speed of Qualcomm modems in 2016 because the Intel chips it was using in some phones were so much slower. Apple eventually stopped using Qualcomm chips altogether in favor of Intel’s.

Qualcomm’s stock was already on a downward trajectory since last week, when one of its most important customers, Huawei, was added to the Commerce Department’s “entity list,” essentially banning U.S. companies from doing business it. Huawei is suspected of doing the bidding of the Chinese government, thereby representing a national security threat.

Qualcomm shares were down about 11 percent during trading Wednesday.