Cleary Gottlieb Steen & Hamilton and Gibson Dunn & Crutcher have won lead roles acting on Google's $1.1bn (£800m) deal with Taiwanese smartphone maker HTC.

Google is buying the HTC engineering team behind the Pixel smartphone it launched last year in a cash deal, the companies said in a joint statement. The search engine will also gain a non-exclusive patent licence.

Cleary is advising longtime client Google with a team led by M&A partners Glenn McGrory and Ethan Klingsberg in New York.

Klingsberg also led the team on Google's 2012 purchase and 2014 sale of Motorola Mobility. The search engine bought Motorola Mobility for $12.5bn, only to sell it two years later for $2.9bn to China's Lenovo Group.

The Cleary team also includes M&A partner Aaron Meyers, executive compensation partner Michael Albano, intellectual property (IP) partner Daniel Ilan and tax partner Corey Goodman in New York, and competition partner Francisco Enrique Gonzalez-Diaz in Brussels.

Gibson Dunn is representing HTC, fielding a team including San Francisco corporate partner Stewart McDowell, Washington DC IP partner Brian Buroker, San Francisco antitrust partner Rachel Brass, London antitrust partner Ali Nikpay, London tax partner Jeffrey Trinklein, and Los Angeles executive compensation and employee benefits partner Sean Feller.

Taiwan's largest law firm Lee & Li is local counsel to Google, while Taiwanese firm Tsar & Tsai is acting for HTC on local law.

The deal, expected to close in early 2018, will see HTC scale back on smartphone manufacturing and concentrate more on the virtual reality business.

Earlier this year, Legal Week reported that Cleary had also won a role acting on a European Union investigation of Google, alongside Clifford Chance and Covington & Burling.

Cleary is acting for Google on the matter. The search engine has already been fined a record €2.4bn (£2.1bn) by the European Commission for favouring its own service. Currently, it is offering to sell space on its shopping search service to rivals to stave off further competition fines, according to reports.