AOL announced Monday it is selling more than 800 patents to Microsoft for $1 billion. (Scott Eells/Bloomberg)

AOL announced Monday that it is selling more than 800 patents to Microsoft for $1 billion, marking the latest salvo in the tech industry’s all-out war over who controls the most lucrative ideas powering the Internet and smartphones.

Companies are spending billions to buy patents, not always to innovate but often as insurance against legal attacks or to threaten their competitors with lawsuits. The desire to stockpile patents is driving many of the biggest tech deals, including the Microsoft purchase.

“It’s a precedent because of the scale of these things,” said Jim Bessen, a fellow at the Berkman Center for Internet and Society at Harvard University. “A billion dollars for 800 patents? That’s just astounding.”

The fixation on acquiring intellectual property is troubling to many observers, who see a broken system, spawned by Washington regulators who have for decades rubber-stamped too many patents that are vague or have questionable value.

For years, most of the companies suing tech giants over patents were minor players in Silicon Valley known as “trolls” because they did not invent anything themselves. But more recently, as tech giants have expanded their reach and crossed into one another’s lines of business, the battle to protect intellectual ideas has intensified.

Now, nearly every major tech company is embroiled in a legal fight over patents. This month, Yahoo sued Facebook over 10 patents relating to advertising, privacy settings and messages. Facebook has countersued. Apple is suing Google’s Android partners, such as Samsung, accusing them of infringing on technology for the iPhone and iPad, such as the “slide to unlock” feature.

Yahoo’s lawsuit, in particular, triggered widespread condemnation from other tech executives, who accuse the company of resorting to desperate tactics as it tries to find a successful business model.

“They’re all acting as opportunists,” Bessen said. “They’re taking advantage of weaknesses in the patent system that shouldn’t be there.”

Microsoft and Apple argue that their lawsuits are simply efforts to protect their legitimate innovations and investments in technology.

Steve Jobs called the Android phone a “stolen product” and vowed to go to “thermonuclear war” over it, according to Jobs biographer Walter Isaacson.

Patents are so lucrative that firms such as AOL and Yahoo — which dominated the Web in the 1990s but are trying to reinvent themselves — can cash in on old patents related to the most basic functions of online communication.

The treasure trove of patents from AOL being sold to Microsoft relates mostly to technology such as instant messaging and e-mail, according to an analysis by research group Envision IP.

Companies that hold the most powerful patents can impose licensing fees on competitors or take them to court to allege infringement.

“Microsoft has one of the most sophisticated engines for monetizing IP in the world. People don’t really know that,” said Erin-Michael Gill, managing director and chief intellectual-property officer at MDB Capital Group, an investment bank.

Microsoft said in a statement that the AOL patents would “complement” its existing trove of patents.

“This is a valuable portfolio that we have been following for years and analyzing in detail for several months,” said Brad Smith, Microsoft’s general counsel and executive vice president.

News of the patent sale pushed AOL’s stock up more than 43 percent.

Google, which was relatively behind in its patent portfolio size, has been playing catch-up. Google purchased Motorola Mobility last year for $12.5 billion, largely to acquire the company’s patents related to cellphone technology. Google made its move after a group of the company’s rivals, including Microsoft and Apple, pooled $4.5 billion to purchase the patents of bankrupt wireless company Nortel.

The big problem with patents, according to experts, is that beginning in the mid-1990s, government officials began issuing amorphous-sounding patents for software and business methods. Whereas the patent for a particular drug might be easy to describe — simply laying out its chemical makeup, for instance — software patents get fuzzy very quickly, often because of broad wording.

For instance, in the fight between Yahoo and Facebook, Yahoo claims that Facebook’s news-feed feature violates its “dynamic page generator” technology patent, which was filed in the 1990s when the company began allowing users to personalize their Yahoo pages. Yahoo also holds a patent on “automatically generating user-customized notifications of changes in a social network system.”

Software patents are often so hard to understand that many developers cannot even figure out whether they are infringing on someone else’s patent before they proceed with their work.

There are not even enough patent lawyers to cover the amount of labor required to scan the hundreds of thousands of software patents that have been issued and figure out exactly what they say, according to a recent research paper by Timothy B. Lee, an adjunct scholar at the Cato Institute, and Christina Mulligan, a postdoctoral resident fellow at the Information Society Project at Yale Law School. They concluded that at least 2 million patent lawyers would be required to work full time to determine whether a company had infringed on any new patents issued in a given year.

President Obama last year signed a bill into law meant to reform the patent system. But many experts said the bill had been so diluted after years of lobbying by business groups that it is unlikely to do much to repair the country’s dysfunctional patent system.