Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Microsoft is selling about 1,500 of its patents to Chinese device maker Xiaomi, a rare departure for the U.S. company and part of what the two companies say is the start of a long-term partnership.

The deal, announced on Wednesday, also includes a patent cross-licensing arrangement and a commitment by Xiaomi to install copies of Microsoft software, including Office and Skype, on its phones and tablets.

A Case Western Reserve University medical student demonstrates using the Microsoft HoloLens augmented reality headset during the keynote address at the Microsoft Build Conference, on March 30, 2016, in San Francisco. Eric Risberg / AP

Both companies declined to discuss financial terms of the deal.

"This is a very big collaboration agreement between the two companies," Wang Xiang, senior vice president at Xiaomi, said by telephone ahead of the deal.

Analysts said Xiaomi's ambitions to be a major player outside China were hampered by weak patent protection and a fear of a prolonged legal battle.

Byers Market Newsletter Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

"This deal might just give them enough of a patent trove to move to Western markets," said Sameer Singh, a UK-based analyst. "Their position in China has been under constant attack from even lower-end Android vendors, so moving overseas is now a necessity."

Shipments of Xiaomi phones fell 9 percent year-on-year in China in the first quarter, according to Strategy Analytics, and its market share dipped to 12 percent from 13 percent, squeezed not only by Huawei and Samsung Electronics but also smaller contenders including Oppo and Vivo.

Wang said the acquisition of Microsoft patents, which included voice communications, multimedia and cloud computing, on top of some 3,700 patents the Chinese company filed last year, were "an important step forwards to support our expansion internationally."

Xiaomi launched its first U.S. device earlier this month, a TV set-top box it developed in cooperation with Alphabet's Google, which owns the Android operating system it and most Xiaomi devices run on. Xiaomi has also launched a tablet which runs a version of Microsoft's Windows operating system.

Jonathan Tinter, corporate vice president at Microsoft, said the company was keen to tap into Xiaomi's young, affluent and educated users by having its products pre-installed on their devices. He declined to go into detail about the patent deals, but said the overall deal was something "we do only with a few strategic partners."

Microsoft has cut licensing deals with many Android device makers over the years, but has had less luck with Chinese manufacturers.

Florian Mueller, a patents expert who consulted for Microsoft in the past, said it was rare for Microsoft to actually sell its patents, adding "it's possible Microsoft found it easier to impose its Android patent tax on Xiaomi as part of a broader deal that also involved a transfer of patents." (Reporting by Jeremy Wagstaff; Editing by Ian Geoghegan)