It’s official: Google is hanging up on the money-losing Motorola Mobility smartphone and mobile devices division, but will keep most of the Motorola patents. Google, however, appears to be taking a bath on this deal after purchasing Motorola for $12.4 billion.

The Internet giant announced a deal Wednesday sell the Motorola group to China’s Lenovo Group for $2.91 billion — ending less than two years of its stewardship, under which the business dropped deeper into decline.

Lenovo’s purchase price of $2.91 billion includes $1.41 billion paid at close, comprised of $660 million in cash and $750 million in Lenovo shares, with remaining $1.5 billion to be paid in the form of a three-year promissory note.

In May 2012, Google closed the $12.4 billion cash acquisition of Motorola Mobility, which the Internet giant had said at the time was driven largely by its desire to obtain Motorola’s portfolio of more than 17,000 patents. Google had announced plans to acquire Motorola in August 2011.

Last spring Google sold off Motorola Home, the cable and video unit, to Arris Group for $2.35 billion. In a 2012 filing, Google said $2.9 billion of the Motorola purchase price was cash acquired, while it estimated the patent portfolio’s worth at a whopping $5.5 billion. If you believe Google’s accounting, then it got its money’s worth. But it’s worth noting that in a patent lawsuit Motorola filed against Microsoft, it was asking for more than $4 billion in royalties — and instead was awarded $1.8 billion by the court.

Selling Motorola,Google CEO Larry Page said in announcing the deal, “will enable Google to devote our energy to driving innovation across the Android ecosystem, for the benefit of smartphone users everywhere.”

Google said it will maintain ownership of the “vast majority” of the Motorola Mobility patent portfolio, including current patent applications and invention disclosures. Lenovo will receive a license to the portfolio of patents and other intellectual property, and in addition Google will grant Lenovo more than 2,000 patent assets, as well as the Motorola Mobility brand and trademark portfolio.

“Lenovo has the expertise and track record to scale Motorola Mobility into a major player within the Android ecosystem,” Page said in a statement.

Lenovo already sells a line of smartphones. With the Motorola deal, the company said, it will gain a strong market presence in North America and Latin America, as well as a foothold in Western Europe, complementing its existing smartphone business in emerging markets.

Motorola Mobility’s current smartphones include the Moto X, Moto G and the Droid Ultra series. “The acquisition of such an iconic brand, innovative product portfolio and incredibly talented global team will immediately make Lenovo a strong global competitor in smartphones,” Lenovo chairman and CEO Yang Yuanqing said in a statement.

Under Google’s wing, Motorola Mobility has been in decline. For the third quarter of 2013, the unit had revenue of $1.18 billion, down 34% compared with $1.78 billion from the year-earlier period, while its operating loss in Q3 2013 was $248 million (versus an operating loss of $192 million in Q3 2012).

As of Sept. 30, Motorola Mobility had 4,259 employees, down from 4,599 three months earlier. Google is scheduled to report fourth-quarter 2013 results Thursday after market close.

Last week, Lenovo reached a deal to acquire IBM’s Intel-based server business for approximately $2.3 billion. In 2005, Lenovo acquired IBM’s PC business, which included the ThinkPad line of PCs.

Word of the Lenovo deal with Google for Motorola was reported Wednesday by China Daily, followed by other outlets.