Post deal, the nature of the two companies will change - Nokia will be just a network equipment maker after it exits from the mobile-phone business it once dominated, while the world's largest software marker will move aggressively into hardware.
Nokia's Canadian boss Stephen Elop, who ran Microsoft's business software division before moving to Nokia in 2010, will now return to the US firm as head of its mobile devices business.
Elop is being considered a successor to Microsoft's retiring CEO Steve Ballmer, who is trying to remake the US firm into a gadget and services company like Apple before he departs, after disastrous attempts so far to compete in mobile devices.
Richmond-headquartered Microsoft will pay 3.79 billion euros for Nokia's devices unit and 1.65 billion euros for patents, according to a statement from the companies.
Nokia was Microsoft's closest partner in smartphones, with the ailing Finnish company one of the biggest supporters of Microsoft's phone software.
Nokia shares jumped over 40 per cent on the Helsinki stock exchange following the announcement. Microsoft shares were marginally up 0.24 per cent in after market trading on Nasdaq.
