David Paul Morris/Bloomberg News

AOL agreed on Monday to sell a portfolio of over 800 patents, and license about 300 more, to Microsoft for $1.056 billion, amid an arms race within the technology industry over intellectual property.

Under the terms of the transaction, AOL will retain a license for the patents it is selling, while Microsoft will receive a nonexclusive license for the technologies AOL is retaining.

It is the latest big deal for patents, at a time when tech companies are amassing intellectual property rights as ammunition against competitors. Last year, Google purchased Motorola Mobility for $12.5 billion, largely for its patent portfolio.

And scores of companies, including Apple, Samsung, Facebook and Yahoo, are clashing in courtrooms over claims to technology underpinning some of the basic functions of smartphones and social networks alike.

The deal will also provide AOL with some sorely needed cash as the struggling Internet company continues its attempt to refashion itself as a media content provider.

AOL began shopping around the patents in the fall, in what it said was a “robust, competitive auction.” The results of the sale may be surprising to some analysts. Two weeks ago, an advisory firm estimated that the sale could yield as little as $290 million.

“The combined sale and licensing arrangement unlocks current dollar value for our shareholders and enables AOL to continue to aggressively execute on our strategy to create long-term shareholder value,” Tim Armstrong, the company’s chairman and chief executive, said in a statement.

The company said it would distribute a “significant portion” of the proceeds to restive shareholders, who have been awaiting positive results from the turnaround campaign from Mr. Armstrong.

Among those investors is Starboard Value L.P., which currently owns a 5.2 percent stake. In a letter on Feb. 24, the investment firm wrote that it remained disappointed in AOL’s progress, and announced a slate of candidates for the company’s board.

Shares in AOL leaped 35.6 percent, to $24.98, in premarket trading on Monday. They had fallen more than 8 percent over the last 12 months.

AOL was advised by Evercore Partners, Goldman Sachs and the law firms Wachtell, Lipton, Rosen & Katz and Finnegan, Henderson, Farabow, Garrett & Dunner.

Microsoft was advised by the law firm Covington & Burling.