Apple and Qualcomm on Tuesday agreed to dismiss all of the legal battles between the two companies around the world.
The settlement includes an unspecified payment from Apple (AAPL) to chipmaker Qualcomm (QCOM).
Both companies will still work together, too. Apple and Qualcomm announced a new six-year license contract, with the option to add two more years. It also announced a multi-year chipset supply agreement.
The companies appeared in court on Monday in a trial that was expected to last for four to six weeks in San Diego. Apple CEO Tim Cook was expected to take the stand.
Apple alleged that Qualcomm -- which has made crucial chips for the iPhone -- charged an unfair amount to license its patents to place calls, connect to the internet and for other technologies, including audio and video.
Qualcomm stock soared as much as 22% following the settlement. Apple stock was flat.
Qualcomm said it expects its agreement with Apple to result in an additional $2 per share in incremental earnings as it ramps up product shipments.