SAN FRANCISCO — For the past two years, Apple and Qualcomm have dueled on three continents over the division of billions of dollars of smartphone profits and even how much consumers pay for their phones.

On Tuesday, just as a trial had begun in a federal courtroom in San Diego over a suit Apple had filed against Qualcomm, the two companies said they had essentially made up.

The companies, one the maker of iPhones and the other the largest provider of mobile chips, said they had agreed to dismiss all litigation between them worldwide. They added that they had reached a six-year agreement for Apple to pay unspecified royalties on Qualcomm’s patents.

That deal, which was effective as of April 1, included a two-year option for an extension, plus a multiyear agreement for Qualcomm to supply chips to Apple. In addition, Apple will make an undisclosed one-time payment to Qualcomm.

At the heart of the disputes was a disagreement over how Qualcomm charges royalties on patents that it holds on mobile chips. The company, based in San Diego, had pioneered a type of cellular communications in the 1990s that later became a mainstay of mobile devices. That allowed it to charge royalties on nearly every smartphone sold — even if the phone did not actually use Qualcomm chips. Apple eventually objected to that arrangement.

The provisions of the deal announced Tuesday suggest at least a partial victory for Qualcomm and its patent-driven business model, which has also attracted harsh scrutiny from regulators like the Federal Trade Commission. Qualcomm’s shares, which have been hurt by the two-year dispute with Apple, jumped 23 percent on word of the settlement.

Advertising

The chipmaker said it expected the settlement to yield incremental revenue of $2 a share as shipments of Apple handsets affected by the settlement grow. At roughly 1.2 billion Qualcomm shares outstanding, that would translate to around $2.5 billion in additional revenue from a combination of royalties and chips, said Stacy Rasgon, an analyst at Sanford C. Bernstein.

In agreeing to settle the case, Apple tacitly acknowledged it was able to live with Qualcomm’s business model — assuming the price of Qualcomm’s royalties is more to Apple’s liking. A slide the companies distributed Tuesday said the deal “reflects value and strength of Qualcomm’s intellectual property.”

Just how much the deal might affect people’s phone prices will not be clear until more financial details of the settlement are disclosed. But the effect on the price of individual handsets is not likely to be large.

An Apple spokesman and a Qualcomm spokeswoman said no further details of the settlement were immediately available. Qualcomm said more information might be disclosed when it releases financial results on May 1.

The battle between the two companies began in January 2017 when the FTC filed a case against Qualcomm that partly leaned on Apple’s contentions. The FTC alleged that Qualcomm was able to charge unfairly large royalties because handset makers had no leverage to negotiate, especially because Qualcomm supplied two key types of chips and could cut off shipments if the buyers balked at paying royalties.

Three days after the FTC filed its case, Apple separately sued Qualcomm. In its suit, Apple objected particularly to Qualcomm’s basing its royalties on a phone’s total price. That formula, Apple argued, meant that Qualcomm earned more money as handset makers added innovations like displays, touch sensors and data storage unrelated to wireless technology.

Advertising

The case dragged on with four Asia-based contract manufacturers that assemble iPhones and iPads, whose suits against Qualcomm were eventually merged with Apple’s. They argued that they had collectively overpaid Qualcomm roughly $9 billion in royalties over the years — a figure that could have been tripled under antitrust laws to $27 billion. Apple also had said Qualcomm should repay $3.1 billion associated with patents whose rights Apple said have been exhausted.

Qualcomm then sought to pressure Apple to settle by filing a series of patent suits, including cases in China and Germany and through the United States International Trade Commission. It also persuaded courts in some countries to ban sales of some iPhone models, though Apple was able to keep selling its handsets with tactics that included tweaking some of its software.

Much of the world-spanning fight appeared to be coming to a head this week in the U.S. District Court for the Southern District of California, where a jury was selected Monday for a trial on Apple’s lawsuit and Qualcomm’s counterclaims. Opening statements started Tuesday morning and were set to continue in the afternoon when the settlement was announced.

Among the top executives who had been expected to take the stand were Timothy D. Cook, Apple’s chief executive, and Steve Mollenkopf, Qualcomm’s chief executive. Settling the litigation helped avoid those spectacles.

The deal between Qualcomm and Apple caught the technology industry by surprise. In the past, Apple had refused to settle an intellectual property fight with Samsung Electronics, pursuing the case for seven years all the way to the Supreme Court before calling a truce last year. The case with Qualcomm had become so ugly and so personal that observers thought Apple would be even less likely to settle quickly.

“I’m floored,” said Patrick Moorhead, president and principal analyst at Moor Insights & Strategy, a technology analysis firm. “Qualcomm got the bigger win because it had the most to lose and the most to gain. And it ended today.”

Moorhead said both sides had incentive to wrap up the proceedings. For Apple, this deal seems to open the door for future iPhones to be able to use Qualcomm’s wireless chips with faster 5G connectivity — something that competitors are expected to start introducing this year. For Qualcomm, the industry’s biggest brand is no longer threatening to upend how it makes money.

Though it was not clear what factors led to the settlement, Rasgon, the analyst at Sanford C. Bernstein, said Apple might have been influenced by the possibility of a ban of iPhone imports by the ITC or by its lagging position in 5G. Qualcomm got to the market first with chips that can support that faster wireless technology, but had stopped selling chips for high-end iPhones.

Apple has been relying instead on chips from Intel for its high-end phones, though Intel was not expected to have 5G chips in large quantities until 2020. Samsung is expected to have 5G handsets using Qualcomm chips this year.

For Qualcomm, the settlement with Apple does not end all its legal troubles. The FTC case went to trial in January and is awaiting the ruling of Judge Lucy Koh of the U.S. District Court for the Northern District of California, who could challenge key elements of Qualcomm’s business model. She had issued a preliminary ruling before the trial indicating that Qualcomm should issue patent licenses to rival chip makers as well as phone makers, a position opposed by the company.