Qualcomm added $30 billion to its market value after it resolved a legal battle with Apple, a move that secures its leadership in 5G phone chips and could pave the way for a similar settlement with China's Huawei Technologies.

The company's shares, which closed up 23 percent on Tuesday after the announcement, rose as much as 17 percent on Wednesday, hitting their highest in nearly two decades.

The deal with Apple, coming at the cusp of the rollout of high-speed 5G network, could help Qualcomm return to the preeminent position it held in the early 2010s when it dominated the transition to 4G mobile networks and expanded revenues dramatically.

Qualcomm's fortunes are also looking up since Intel, which had been Apple's sole iPhone chip supplier for the past year, decided to exit the modem chip business following Qualcomm's settlement with Apple.

"In the U.S., around 5G it's Qualcomm's world and everyone else is just paying rent," said Dan Ives, an analyst with Wedbush Securities.

"This was a game-changing settlement for Qualcomm and was also a smart move by Apple to clear this noise and focus on 5G smartphones for 2020."

Wall Street analysts scrambled to raise their recommendations and price targets on Qualcomm's stock following the settlement.

At least three brokerages raised their ratings and nine ratcheted up their price targets. Stifel made the most aggressive move by raising its target by $43 to $100 — well above the median price target of $75.85.

Of the 25 brokerages covering the stock, 14 rate it "buy" or higher and the rest have a "hold" rating, according to Refinitiv data.

The company could make $2 billion annually by taking Intel's market share and regain the dominant position it enjoyed during the rollout of 4G, analysts said.