Satya Nadella replaces Steve Ballmer immediately to become only the third chief executive in Microsoft's 38-year history. Company founder and first CEO Bill Gates is leaving his role as chairman to serve as an adviser. He will spend a third of his time working on future products and technology.
Nadella, 46, most recently headed the company's small but growing cloud computing unit, in which customers buy software and services housed on distant servers connected to the Internet. It's a departure from Microsoft's roots making software installed directly on personal computers.
In addition to growing that business, one of Nadella's first tasks as CEO will be the completion of Microsoft Inc.'s $7.3 billion purchase of Nokia's phone business and patent rights - part of a plan to boost Windows Phone software in a market dominated by iPhones and Android devices.
The direction points the company toward an orbit occupied by rivals Google Inc., Apple Inc. and Amazon.com Inc. and away from the core PC business that has been Microsoft's mainstay.
"Going forward, it's a mobile-first, cloud-first world," Nadella said in a video accompanying the announcement Tuesday.
Nadella, who has worked at Microsoft for 22 years, vowed to remove any obstacles that prevent the company from innovating and said he would capitalize on Microsoft's experience in making the industry's leading productivity software package, Office.
"We need to be able to pick the unique contribution that we want to make," he said. "That's where our heritage of having been the productivity company ... is what we want to get focused on."
Gates, meanwhile, will remain on the company's board. The new Microsoft chairman will be board member John Thompson, who led the search for a new CEO after Ballmer said in August that he planned to step down.
Thompson said Nadella was the board's "first and unanimous choice." Other candidates considered included Ford CEO Alan Mulally and other insiders such as Chief Operating Officer Kevin Turner and former Skype head Tony Bates.
Nadella has "the right background to lead the company in this era," Gates said in a video message. "There's a challenge in mobile computing. There's an opportunity in the cloud. The various business groups he's worked in, he's driven innovation, gotten architectures put together that really meet the needs of our customers. The opportunity for Microsoft is greater than ever before."
Nadella has been an executive in some of the company's fastest-growing and most-profitable businesses, including its Office and server and tools business. In four years as division president, he helped grow that business into one with $20 billion in annual revenue - about a quarter of Microsoft's total revenue in the most recent fiscal year.
For the past seven months, he was the executive vice president who led Microsoft's cloud computing offerings. Nadella's new cloud enterprise group has also been growing strongly, more than doubling customers in the latest quarter - although it remains a small part of Microsoft's current business.
Analysts hope that Nadella can maintain the company's momentum in cloud computing services and business software while minimizing the negative effect of Microsoft's unprofitable forays into consumer hardware. It's a transition IBM Corp. succeeded in making in the 1990s, but that companies such as Hewlett Packard Co. and Dell Inc. have struggled with.
Microsoft shares rose 13 cents to $36.61 in midday trading Tuesday.
Nadella's appointment comes at a time of turmoil for Microsoft.
Founded in 1975 by Gates and Paul Allen, the company has always made software that powered computers made by others - first with its MS-DOS system, then with Windows and its Office productivity suite starting in the late 1980s. Microsoft's coffers swelled as more individuals and businesses bought personal computers.
But Microsoft has been late adapting to changes in the technology industry as PC sales declined. It allowed Google to dominate in online search and advertising, and it watched as iPhones, iPads and Android devices grew. Microsoft's attempts to manufacture its own devices have been marred by problems, from its quickly aborted Kin line of phones to its still-unprofitable line of Surface tablets.
Analysts see hope in some of the businesses Nadella had a key role in creating.
Microsoft's cloud computing offering, Azure, and its push to have consumers buy Office software as a $100-a-year Office 365 subscription are seen as the biggest drivers of Microsoft's growth in the next couple of years. Both businesses saw the number of customers more than double in the last three months of the year, compared with a year earlier.
Nadella "was really one of the people who helped build up the commercial muscle," said Kirk Materne, an analyst with Evercore Partners. "He has a great understanding of what's going on in the cloud and the importance of delivering more technology as a service."
Michael Turits, an analyst with Raymond James, said that Nadella will likely view the Nokia acquisition and the Surface tablet as pawns to help drive Microsoft's cloud computing business.
"Whatever strategic decisions are made, we like the idea that someone like Satya would most likely make them with an eye to preserving and optimizing the value of those enterprise businesses," Turits said.
Nadella is a technologist, fulfilling the requirement that Gates set out at the company's November shareholder meeting, where the Microsoft chairman said the company's new leader must have "a lot of comfort in leading a highly technical organization."
Born in Hyderabad, India, in 1967, Nadella received a bachelor's degree in electrical engineering from Mangalore University, a master's degree in computer science from the University of Wisconsin, Milwaukee, and a master's of business administration from the University of Chicago.
He joined Microsoft in 1992 after being a member of the technology staff at Sun Microsystems.
Partly because of Nadella's insider status and the fact that both Gates and Ballmer will remain among Microsoft's largest shareholders and, for now, company directors, analysts are not expecting a quick pivot in the strategy of making tablets and mobile devices.
Some hope, however, that he will make big changes that will help lift Microsoft stock, which has been stuck in the doldrums for more than a decade. Since Ballmer took office on Jan. 13, 2000, Microsoft shares are down a split-adjusted 32 percent, compared with a 20 percent gain in the S&P 500.
"We do not want to see a continuation of the existing direction for the business," Nomura analyst Rick Sherlund wrote in a note Friday. "So it will be important that Mr. Nadella be free to make changes."
AP Business Writer Barbara Ortutay in New York contributed to this story.