Web giant thinks Motorola will thrive under Lenovo.

Google has confirmed it will sell Motorola Mobility to Lenovo for $2.91 billion, less than two years after acquiring it.

Under the terms of the agreement, Google will retain the “vast majority” of Motorola patents, which it will use to defend the entire Android ecosystem.

Lenovo will keep the Motorola brand name alive and hopes to gain a foothold in the western smartphone markets where it has zero presence.

It is unclear just how big a loss Google is making in this transaction. When the web giant announced it was going to acquire Motorola Mobility for $12bn in 2011, eyebrows were raised. Motorola had been struggling, ratcheting up losses of $4.3 billion between 2007 to 2009, and it spun off the handset business.

Most analysts suggested the reason behind Google’s acquisition of Motorola was for the vast patent portfolio. Based on Google’s explanation for the sale to Lenovo, it’s clear the patents were the primary target.

“[On] the intellectual property side, Motorola’s patents have helped create a level playing field, which is good news for all Android’s users and partners…Google will retain the vast majority of Motorola’s patents, which we will continue to use to defend the entire Android ecosystem,” explained Google CEO Larry Page in a blog post.

“Lenovo has the expertise and track record to scale Motorola into a major player within the Android ecosystem. They have a lot of experience in hardware, and they have global reach.”

This is the second high-profile acquisition Lenovo has made in a week as it continues to push forward in the hardware market. The Chinese firm announced it was splashing out $2.3 billion on IBM’s x86 business, last week.

Lenovo has a solid track record when it comes to building market share through acquisitions. The firm purchased IBM’s ThinkPad range of laptops in 2005, and has used the brand to catapult itself to the top of the PC market.

With Motorola making some of its best handsets in years in the form of the Moto X and Moto G, it wouldn’t be a surprise to see the brand return to a dominant position under the stewardship of Lenovo.