Google Inc. (GOOG), the biggest maker of smartphone software, agreed to buy Motorola Mobility Holdings Inc. for $12.5 billion in its largest acquisition, gaining mobile patents and expanding in the hardware business.

Motorola shareholders will get $40 a share in cash, the companies said in a statement today. That’s 63 percent more than Motorola Mobility’s closing price on the New York Stock Exchange on Aug. 12. Both boards have approved the takeover.

Larry Page, the Google co-founder who took over as chief executive officer in April, is pushing the Web company into smartphones to take on Apple Inc. (AAPL)’s iPhone and gain more clout for its Android software in the wireless business. Motorola Mobility, under pressure from activist investor Carl Icahn to shift strategy, gives Google more than 17,000 patents it can leverage in negotiations with competitors such as Apple.

“This is the next step in building their position in the mobile world so they can distribute Google products and services through mobile phones and tablets,” said Clayton Moran, an analyst at Benchmark Co.

in Boca Raton, Florida, who recommends Google shares. “They want a success with the Android platform, and this will enhance their position in the mobile marketplace, as well as defend their position through the patent portfolio.”

Apple, which makes its own wireless software and hardware, briefly became the most valuable company in the world last week, buoyed by demand for the iPhone and the iPad tablet computer.

Motorola Mobility, based in Libertyville, Illinois, rose $13.65, or 56 percent, to $38.12 at 2:14 p.m. on the New York Stock Exchange. Google, based in Mountain ViewCalifornia, fell $9.54, or 1.7 percent, to $554.23 on the Nasdaq Stock Market.

‘Heck of a Premium’

Google is paying a premium of 73 percent compared with Motorola Mobility’s 20-day trading average price before today. The average premium of more than 360 deals in the wireless- equipment industry on that basis was 32 percent in the past five years, according to Bloomberg data.

“This is a heck of a premium,” said Lee Simpson, an analyst at Jefferies International in London. Motorola Mobility’s patents are “a good counterweight if Apple comes after Google.”

InterDigital Inc., an owner of about 1,300 mobile-phone patents that is considering a sale, fell $16.25, or 21 percent, to $59.48. Apple and Google were among companies considering possible bids for InterDigital, a person with knowledge of the situation said last month.

Breakup Agreement

Google agreed to pay Motorola Mobility $2.5 billion if the deal falls through, a person familiar with the matter said. Motorola Mobility would pay $375 million if it decided not to sell to Google, the person said.Jennifer Erickson, a spokeswoman for Motorola Mobility, declined to comment on the breakup fee, as did Aaron Zamost, a spokesman at Google.

Google has $39.1 billion in cash and equivalents, according to a regulatory filing last month.

The acquisition — the largest wireless-equipment deal in at least a decade, according to data compiled by Bloomberg — also makes Google a competitor to the other handset makers that make Android devices. In addition to Motorola Mobility phones, the software runs handsets made by companies such as Samsung Electronics Co. andHTC Corp. (2498)

“Google making an acquisition of one distinct player is going to put Samsung and HTC back on their heels and thinking, ‘Do we need to go forward with this platform?’” Simpson said. “‘Are there other platforms we can use?’ It might start to put Microsoft into focus as an alternative platform,” he said, referring to Microsoft Corp. (MSFT)’s Windows Phone software.

Partner Support

T-Mobile USA Inc. introduced the first phone powered by Google’s Android software, made by HTC, in October 2008. Android, which Google offers for free, will remain available to other manufacturers, the company said. Winston Yung, chief financial officer of HTC, gave his support to the deal, saying it will strengthen “the whole Android ecosystem.”

Google said Samsung and Android-phone manufacturers Sony Ericsson Mobile Communications AB and LG Electronics Inc. (066570)also support the transaction.

Microsoft rose 26 cents, or 1 percent, to $25.36. Nokia Oyj (NOK1V), which plans to start making Windows phones, climbed 9 percent to 4.09 euros in Helsinki.

‘Protect Android’

Android was the best-selling smartphone operating system in the second quarter as sales rose more than fourfold to 43.3 percent of the market, led by Samsung and HTC, according to research firm Gartner Inc. Apple had an 18.2 percent share, the researcher said. While Motorola Mobility’s Droid phones have found a following in the U.S., globally the company ranks outside the top players in the smartphone market.

“The combination of the two companies is going to create tremendousshareholder value, drive great user experiences and accelerate innovation,” Page said today on a conference call. “Motorola also has a strong patent portfolio, which will help protect Android from anticompetitive threats from Microsoft, Apple and other companies.”

A group led by Apple and Microsoft won an auction of patents owned by Nortel Networks Corp. in June after bidding up the price to $4.5 billion, beating out Google. Apple and Microsoft have sued Android device makers over the use of intellectual property, disputes that are wending their way through the courts.

Patent Contest

In a blog posting Aug. 3, Google accused Apple, Microsoft and Oracle Corp. of using patents to wage a “hostile, organized campaign” against Android.

“There is an intellectual property arms race between Apple, Google and Microsoft,” said Kevin Smithen, a telecommunications analyst at Macquarie Securities Group in New York.

Google had a total of 754 patents assigned to it as of last week, according to the U.S. Patent and Trademark Office database, not including patents Google bought last month from International Business Machines Corp. Apple received 563 new patents just last year, the agency said.

The deal marks the end of independence for a company that helped pioneer mobile phones and introduced its first consumer handset in the early 1980s.

Motorola announced a plan to spin off its mobile-phone business in March 2008 amid market share losses and pressure from billionaire Icahn. The company completed the split in January, after the global recession delayed the deal. Motorola Inc. became Motorola Solutions Inc., which makes radio equipment for emergency workers and scanning devices for retailers.

‘Great Outcome’

Last month, Icahn urged Motorola Mobility to explore alternatives for its patent portfolio after Nortel’s patent sale, the largest-ever patent auction.

“This is a great outcome for all shareholders of Motorola Mobility, especially in light of today’s markets,” Icahn said today in a statement. “We applaud management and the board for acting so responsibly.”

Since the January spinoff, Motorola Mobility shares had lost about a fifth of their value before today as the company struggled to return to profitability and keep pace with larger rivals such as Samsung and Apple.

Qatalyst Partners and Centerview Partners LLC advised Motorola, and Wachtell, Lipton, Rosen & Katz LLP provided legal help. Lazard Ltd. advised Google, whileCleary Gottlieb Steen & Hamilton LLP was the legal counsel.

Regulatory Scrutiny

The Google acquisition is likely to attract the attention of regulators, said Mark Mahaney, an analyst at Citigroup Global Markets, who rates Google a “hold.” The company, which owns the world’s most popular search engine, is already under review by the U.S. Federal Trade Commission over its business practices.

“Regulatory scrutiny will likely be material,” Mahaney said in a report today. It’s “very hard to see this deal closing by year-end,” he wrote.

Still, the scrutiny may be tempered by the fact that Google doesn’t currently make handsets, and that Apple and Microsoft have already gained approval for the purchase of Nortel’s patents, said Macquarie’s Smithen.

“We’re quite confident that this will be approved,” said David Drummond, Google’s chief legal officer.