SEATTLE -- Microsoft said it has reached an agreement to acquire the handset and services business of Nokia for about $7.2 billion, in an audacious effort to transform Microsoft's business for a mobile era that has largely passed it by.
Late Monday night, Microsoft and Nokia said 32,000 Nokia employees would join Microsoft as a result of the all-cash deal, which would turn the Finnish mobile phone pioneer into the engine for Microsoft's mobile efforts.
Stephen Elop, the former Microsoft executive who was running Nokia until the deal was signed, will rejoin Microsoft after the transaction closes, setting him up as a potential successor for Steven A. Ballmer, Microsoft's chief executive. Mr. Ballmer has said he will retire from the company within 12 months.
"This agreement is really a bold step into the future for Microsoft," Mr. Ballmer said in a telephone interview from Finland. "We're excited about the talent capabilities it will bring to Microsoft."
Nokia was once the mightiest company in the mobile phone business, but it has lost much of its luster as the industry shifted to the era of the smartphone. Samsung and Apple divide nearly all of the profits in the global smartphone business now.
A megadeal between Nokia and Microsoft of the sort announced Monday night is something that pundits and analysts have speculated about for years, after Mr. Elop joined Nokia and signed a pact with Microsoft in February 2011 to standardize on the software company's Windows Phone operating system.
The fortunes of the two companies in the mobile business have become closely intertwined since that agreement, but it has done little to turn either company into a leader in the mobile business. Windows Phone accounted for only 3.7 percent of smartphone shipments in the second quarter, according to the technology research firm IDC.
Nokia remains the second-largest shipper of mobile phones in the world after Samsung, but that is largely because of lower-end feature phones, from which consumers are moving away. Nokia is no longer among the top five makers of smartphones.
A big question is whether Microsoft and Nokia will succeed as one company where they have not as close partners. Mr. Ballmer said Microsoft and Nokia have not been as agile separately as they will be jointly, citing how development could be slowed down when intellectual property rights were held by two different companies. "There's friction," he said.
Carolina Milanesi, an analyst at Gartner, says she believes the deal could help the companies respond more quickly to the dynamism of the mobile market. "They need to move faster," she said.
Large acquisitions are fraught with peril, especially in the technology business, where there are challenges to integrating employees from different backgrounds into a coherent whole.
The Nokia deal echoes Google's $12.5 billion deal to acquire Motorola Mobility, which gave it control of a trove of mobile patents and a handset business that has yet to shine under Google's ownership.
While Microsoft still has enormous stockpiles of cash from its lucrative software business, there has been widespread speculation about how long Nokia could make it as an independent company, given how the spoils of the industry have gravitated to companies like Apple and Samsung. For Microsoft, there was risk that Nokia could have ended up as an acquisition target for another company, creating uncertainty around the future of their earlier business partnership.
Microsoft will pay about $5 billion for Nokia's devices and services business and $2.18 billion to license Nokia's patents. After it sells its high profile handset operations, Nokia will be left with three primary businesses: network infrastructure and services; mapping and location services; and a technology development and licensing unit.
The company will continue to do business as Nokia, licensing the Nokia name to Microsoft for use on its mobile phones for 10 years. "For Nokia today, it's a moment of reinvention," Risto Siilasmaa, the chairman of Nokia's board, said in an interview.
Mr. Siilasmaa also assumed the title of interim chief executive. Since Mr. Elop plans to join Microsoft after the deal is closed, which is expected to happen in the first quarter of 2014, he resigned as chief executive and relinquished his Nokia board seat to avoid conflicts of interest. He has become a Nokia executive vice president, reporting to Mr. Siilasmaa.
Mr. Ballmer declined to say whether Mr. Elop, considered a leading contender to be his successor because of his familiarity with Microsoft and the importance of mobile to Microsoft's future, will be considered for the job. "Our board is running an open succession process, considering internal and external candidates," he said.
"I think it strengthens his potential for C.E.O.," said Ms. Milanesi, the Gartner analyst. "It makes perfect sense."
Mr. Elop, a native of Canada whose family still lives in the Seattle area, said in an interview that he believes the industry is at a "tipping point" where a third mobile phone ecosystem, based on Windows Phone, will emerge as a more vibrant alternative to the iPhone and devices running Google's Android operating system.
In a sign of how vital Nokia's partnership has become to Microsoft, Mr. Ballmer said the first calls he made outside Microsoft to discuss his retirement and succession planning at the company were to Mr. Elop and Mr. Siilasmaa.
Mr. Ballmer said his conversations with Nokia about an acquisition "heated up in the last several months," but started during a mobile industry conference in Barcelona in late February.
For Microsoft, there is also an attractive financial dimension to the deal. Because Nokia is based in Finland, Microsoft can use a portion of its foreign-held cash to pay for the acquisition, allowing it to avoid hefty taxes it would otherwise pay to bring the cash back to the United States. Microsoft took a similar approach to its $8.5 billion deal to acquire Skype, the largest deal in its history.
The plan to buy Nokia is likely to upset the other companies that use Microsoft's Windows Phone operating system on their devices, notably HTC and, to a lesser extent, Samsung. But there is little business there for Microsoft to lose. Mr. Ballmer said that Nokia's phone currently counts for more than 80 percent of the Windows Phones sold.
This article originally appeared in The New York Times.