Shares in Asian makers of Android mobile phones have risen, after Google said it would buy Motorola's handset business for $12.5bn (£7.7bn).

The agreement is expected to give the likes of HTC and Samsung Electronics a greater degree of protection against possible patent disputes.

Shares in Samsung rose more than 4%, while HTC shares were 2% higher on Tuesday.

Google is the primary developer of the Android software for mobile devices.

However, because many companies own related patents, the internet giant is open to being sued by rivals.

Its purchase of Motorola Mobility gives Google ownership of 17,000 mobile patents, with thousands more pending.

That means mobile phone makers that license Android software may now receive more protection against future patent lawsuits.

"We welcome the news of today's acquisition, which demonstrates that Google is deeply committed to defending Android, its partners, and the entire ecosystem," HTC chief executive Peter Chou said in a statement.

Besides HTC and Samsung, other companies that use the software include Sony Ericsson and LG Electronics.

So-called contract equipment manufacturers, which make phones for brands other than its own, also received a boost from the Google deal.

Shares in Taiwan's Foxconn rose by more than 14% while Compal Communications jumped by more than 7%.