Nokia shares rose 15 cents, or 2.45 percent, to $6.26 in New York trading, after the announcement of the deal. Its shares had plunged on May 31, after Nokia revised its second-quarter sales and profit forecasts sharply lower, and abandoned its previously announced full-year targets for 2011 amid rising competition.

Apple described the agreement as limited in scope.

“Apple and Nokia have agreed to drop all of our current lawsuits and enter into a license covering some of each other’s patents, but not the majority of the innovation that makes the iPhone unique,” Apple said. “We are glad to put this behind us and get back to focusing on our respective businesses.”

Analysts said the financial impact on Apple was likely to be small.

“I don’t think it is material,” said Charles Wolf, an analyst with Needham & Company. Investors appeared to agree, sending Apple’s shares up about 1.8 percent, to $332.44.

Mr. Wolf said most of the Nokia patents appeared to cover highly technical internal components, which he described as the “plumbing” of mobile devices. The iPhone’s distinctive look and feel did not infringe on Nokia’s patents, he said. The mobile phone makers had been embroiled in more than 40 patent lawsuits in Germany, Britain and the United States since 2009 over basic technologies relating to a handset’s user interface, power management, antenna and camera.

Florian Mueller, an intellectual property analyst in Starnberg, Germany, said the announcement was a victory for Nokia, which in the first quarter ceded its long-held lead in global cellphone revenue to Apple. The iPhone is the world’s best-selling smartphone.