Google’s unexpected bid to buy cellphone maker Motorola Mobility for $12.5 billion intensifies its rivalry with fellow tech titan Apple, as both companies battle for the lucrative smartphone market.

The acquisition — Google’s biggest ever — marks a departure for the search company, which has always given its popular Android software to phone makers but now will be able to build the devices itself. Even more crucial for Google, the Motorola purchase would give the company a giant trove of the most coveted commodity in the tech industry these days: patents.

Motorola boasts more than 17,000 patents relating to wireless technology. That will expand Google’s patent holdings by more than eight times as the company tries to play catch-up in a Cold War-like race among tech firms to build intellectual property arsenals — or risk destruction as they increasingly sue one another for idea theft.

Having more patents means a company can make money by licensing technology to other companies, or a company can target rivals by either launching patent-based lawsuits or sitting on patents to ward off litigation.

Google and its Android partners, including Motorola, Samsung and HTC, have been hit with multiple lawsuits alleging patent violations by Apple, Microsoft and Oracle. Google’s rivals say stolen technology has powered Android’s meteoric rise.

But Google has argued that it is unfairly being ganged up on by companies intent on killing Android, which has quickly become the most popular operating system for smartphones.

“Our acquisition of Motorola will increase competition by strengthening Google’s patent portfolio, which will enable us to better protect Android from anti-competitive threats from Microsoft, Apple and other companies,” wrote Google’s chief executive and co-founder Larry Page on the company’s official blog.

Page and other Google officials sought to portray the company’s purchase of Motorola as good for competition, especially since the search giant is under investigation by U.S. and European antitrust enforcers for unfairly hurting rivals.

The Federal Trade Commission is already looking at broad worries about how Google leverages its dominance. As is typical for acquisitions of this size, the Motorola deal will also be reviewed separately by federal officials — most likely from the Department of Justice, according to a person familiar with the matter.

Antitrust experts said the deal could be tough for officials to challenge because Google would be expanding into a new area, cellphone manufacturing. Courts typically are more worried about deals where a company acquires a firm with which it already competes head to head.

Melissa Maxman, an antitrust attorney at Cozen O’Connor, said that if anything, antitrust enforcers might add restrictions on Google’s behavior to protect Android partners such as Samsung from being treated unfairly now that Google will also be making its own phones with Android. Company officials said in a conference call with investors Monday morning that it will treat all its Android partners equally.

Even though the acquisition seems to push Google into uncharted markets, it plays into the company’s central strategy of getting as many people as possible to use its search engine, which generates ad revenue. With mobile technology becoming the fastest growing and most lucrative part of the industry, Google has used Android to plunge into the mobile search market.

“There’s tremendous opportunity here,” Page said on a conference call with analysts Monday. “Android is growing like crazy.”

But some analysts said the move to acquire Motorola might have been prompted by Google’s loss earlier this year in a bidding war for the patent portfolio of Nortel Networks, a Canadian telecommunications equipment maker that had declared bankruptcy. After Google made a bid for the patents, a group of the company’s rivals, including Microsoft and Apple, swooped in together to buy Nortel’s 6,000 patents for $4.5 billion.

Motorola Mobility’s patent portfolio is far bigger than Nortel’s. Google has a much smaller portfolio — estimated to contain about 2,000 patents — compared with older tech firms.

“They had no choice,” said Alexander Poltorak, chief executive officer of General Patent Corp. “They had to acquire a large patent portfolio.”

Many experts think that the entire patent system is broken because of how easily the government approves even the most abstract ideas.

“This is a good example of saying of how huge an impact the patent system and its broken form is having on the technology industry,” said Ed Black, president and chief executive of the Computer and Communications Industry Association. “It’s making multibillion-dollar deals necessary, and it’s triggering lawsuits all over the place.”