Image copyright Getty Images

Tech giants Apple and Qualcomm have agreed to settle all ongoing lawsuits, putting an end to a long-running battle with billions of dollars at stake.

"All litigation between the two companies worldwide" has been dropped, the firms said in a joint statement.

The surprise settlement brings an end to a long-running battle over the cost of the processors that phones use to connect to mobile networks.

Apple accused chip-maker Qualcomm of overcharging, a claim the firm denied.

The settlement includes a payment from Apple to Qualcomm, but the firms did not disclose its size.

The two firms have also agreed a six-year global patent licensing agreement and also agreed for Qualcomm to supply parts to Apple for multiple years.

This means that Qualcomm's modem chips are likely to be used again in Apple's newest iPhone models. The iPhone used to rely entirely on Qualcomm's chips, but from 2016 Apple started using rival Intel's modem chips in some models.

Shares in Qualcomm surged 23% after the announcement, while Apple's remained flat.

Ben Wood, chief of research at CCS Insight said the settlement was "a huge vindication for Qualcomm".

"[It is] likely an acknowledgement by Apple that it had run out of options, particularly when it comes to 5G.

"There was a growing body of evidence that Intel, its current chipset provider, was struggling to deliver a 5G solution in a timely manner," he added.

After news of the settlement became public, Intel announced it would be withdrawing from the business of making 5G modems for smartphones.

The row between Apple and Qualcomm began in 2017, when Apple first filed a legal complaint. It claimed that Qualcomm's dominance in phone technology let it get away with charging high fees.

Qualcomm has an extensive patent portfolio covering many of the technologies used in smartphones and derives a significant amount of its annual revenue through licence payments from phone makers.

It argued that its technology covers more than just these basic chips, called modems, and that is why it asked electronics firms to pay the fees.

Qualcomm had also accused Apple of using the legal system as a way to pay less for its technologies.