Qualcomm made a big victory on Tuesday in its wide-ranging legal dispute with Apple, which reached a surprise settlement that allows the return of iPhone phones to use Qualcomm's modem chips again.

The two companies signed a six-year patent license agreement and a supply agreement that will pave the way for the use of Kodak's modem chips for iPhone phones after they used Intel chips last year.

Shares in Qualcomm jumped 23% to $ 70.45 in regular trading, its biggest gain in more than 19 years, and then reached $ 75.25 in the hours after trading.

The settlement with Qualcomm will help Apple develop a phone that supports fifth-generation communications technology given Qualcomm's ability to produce modem chips for fifth-generation networks.

The settlement came after two years of legal dispute between the two companies, and the opening arguments were before a federal court in San Diego.

Apple has accused Qualcomm of illegally exploiting patents to maintain the monopoly of modem chips that connect phones to mobile data networks. Qualcomm said Apple was using its technology without paying for it.

Apple began using Intel modem chips on some iPhone devices in 2016. It stopped paying for a license fee for Qualcomm and the use of chips for the iPhone in 2018.

Judge Gonzalo Corriell briefly took the jury, while Noreen Kral, Apple's chief prosecutor, negotiated privately with Qualcomm's Mark Snyder before Corriel summoned jurors to the courtroom.

The judge told the jury: "The two parties have reached the ideal result, which allows technology companies to return to work and will allow you to return to your affairs."