Microsoft has announced a surprise deal to buy Nokia’s Devices & Services unit for €5.44 billion in cash, with the ailing device maker stating that “we believe this transaction is the best path forward for Nokia and shareholders”.

Microsoft will pay €3.79 billion for the Devices & Services unit, and €1.65 billion to licence Nokia’s patents.

Following the deal, which will see Nokia shedding a unit which generated around half of its net sales in 2012, the Finnish company intends to focus on “three established businesses, each of which is a leader in enabling mobility in its respective market segment”.

It will be left with NSN, the infrastructure business it took full ownership of earlier this year; Here, its location and mapping business; and “Advanced Technologies”, which was described as “a leader in technology development and licensing”.

Former Microsoft executive Stephen Elop, who has been president and CEO of Nokia, is “stepping aside” in this role in order to become EVP of Devices & Services, in preparation for a return to his previous employer.

Risto Siilasmaa, chairman of Nokia (pictured, right), is taking on the role as interim CEO.

In addition to the smartphone business, Microsoft will take on Nokia’s feature phone business, “as well as an industry-leading design team, operations including all Nokia Devices & Services production facilities, Devices & Services-related sales and marketing activities, and related support functions”.

Microsoft has also agreed a 10-year licence agreement with Nokia to use the Nokia brand on “current Mobile Phones products”. There are some limitations on Nokia’s use of the brand in the devices space.

At closing, approximately 32,000 people are expected to transfer to Microsoft, including around 4,700 in Finland. Nokia’s Chief Technology Office organisation and patent portfolio will remain within Nokia Group.

Nokia executives Jo Harlow (EVP, Smart Devices), Juha Putkiranta (EVP, Operations), Timo Toikkanen (EVP, Mobile Phones) and Chris Weber (EVP, Sales and Marketing) are also expected to transfer to Microsoft.

Marko Ahtisaari, EVP of Design, has “decided again to pursue entrepreneurial opportunities”.

Excluding the staff planned to transfer to Microsoft, Nokia would have employed around 56,000 people at the end of the second quarter of 2013.

Microsoft has also agreed to make available to Nokia €1.5 billion of financing, in the form of three €500 million of convertible bonds. If drawn-down, any outstanding bonds will be redeemed and netted against the proceeds of the transaction.

The deal is expected to close in the first quarter of 2014, subject to approvals. A $750 million termination fee is payable by Microsoft to Nokia in the event of the deal not receiving the necessary approvals.