Google (GOOGL 1.89%) just signed an agreement to sell its Motorola Mobility division to Chinese hardware giant Lenovo. The deal was officially announced in a blog post by Google CEO Larry Page, followed by a joint press release.

Lenovo is paying Google $2.91 billion in a combination of cash and stock, starting with a $1.41 billion payment due at closing. The rest comes in the form of a $1.5 billion, three-year promissory note. But first, the acquisition has to be approved by regulatory bodies in China and the U.S.

Not all of Motorola is leaving Google. Lenovo will not receive "the vast majority" of Motorola's mobile patents portfolio, though it will get 2,000 of Motorola's patents and a cross-license agreement to use the remainder.

Google originally paid $12.5 billion for Motorola Mobility, but the company came with $3 billion in net cash and $1 billion of tax credits. Moreover, Google sold the set-top division to Arris (ARRS) for $2.4 billion. Depending on the value of the Motorola assets Google keeps in this deal, it's not immediately clear whether the company gained or lost money on its big-ticket hardware adventure.

This announcement follows on last week's news of IBM (IBM -0.84%) selling its x86 server products to Lenovo for $2.3 billion.

Larry Page says the deal will allow Google to refocus on the wider Android ecosystem, but that Google remains committed to consumer-grade hardware. "The dynamics and maturity of the wearable and home markets, for example, are very different from that of the mobile industry," he said. "We're excited by the opportunities to build amazing new products for users within these emerging ecosystems."