SAN FRANCISCO (AP) – Microsoft’s quarterly profit and revenue sailed past expectations Thursday, as CEO Satya Nadella’s push to embrace cloud computing and diversify into mobile devices helped lift sales by 25 percent.

Revenue from cloud services, including software delivered over the Internet, more than doubled last quarter at a time when some of Microsoft’s better-known segments are slowing. Shares jumped over 3 percent in after-hours trading. The stock, which closed at $45.02 before the results were released, is up 33 percent in the last 12 months.

Microsoft still makes most of its money from selling traditional software for businesses and home computers. But Nadella has acknowledged that traditional software has an uncertain future, as people buy fewer personal computers and businesses switch to software that can be accessed online, instead of installing programs on individual machines.

The tech giant reported net income of $4.54 billion, or 54 cents per share, for its fiscal first quarter that ended in September – beating analysts’ consensus estimate of 49 cents per share, according to FactSet. That’s down from $5.24 billion, or 62 cents per share, a year ago, due to over $1 billion in costs to restructure and integrate its recent purchase of Nokia’s smartphone business. The company also spent more on sales, marketing and research and development during the three-month period.

Revenue grew to $23.20 billion from $18.53 billion, topping analysts’ $22.01 billion forecast. This quarter’s sales include $2.6 billion revenue from the phone business, which Microsoft didn’t own a year ago.

“It feels like Nadella is finally steering the Microsoft ship in the right direction,” after several years in which the company struggled under its previous CEO, Steve Ballmer, said FBR Capital Markets analyst Daniel Ives. He said Microsoft’s performance is especially striking at a time when other tech stalwarts, such as IBM Corp., have reported weak earnings for the last quarter.

Overall, the numbers showed how Microsoft’s business is shifting: Its mobile phone segment showed modest growth. Sales of Surface tablets and Xbox gaming consoles surged. But growth has slowed in the division that sells traditional business software, which currently represents almost half the company’s business. The Redmond, Washington, company also reported a dip in licensing revenue for consumer software, including its Windows operating system for personal computers.

Nadella, who was named CEO earlier this year, has said mobile and cloud services are critical to Microsoft’s future. The company spent $4.5 billion last year to expand its own computer centers that support cloud services. That’s a little more than the $4.4 billion that Microsoft expects to make in revenue from commercial cloud services this year. Cloud services currently provide only about 5 percent of Microsoft’s annual sales. But analysts say it’s an important, growing market.

“That’s the big focus for them,” said Forrester Research analyst John Rymer. “They’ve concluded, and I think they’re right, that that is the future of the IT industry.”

Microsoft isn’t the only big tech company that sells cloud-based programs. It vies with Inc. and Google Inc., among others, in the market for selling “public cloud” services to business customers. That means companies can use software stored on Microsoft’s servers, or they can use Microsoft’s computer centers to store their data or build and operate their own Internet services. Amazon has been the leader in that business, but Microsoft says it’s signing up thousands of new customers every week.

As part of its cloud strategy, Microsoft announced several new commercial services earlier this week. It also touted a new partnership with Dell to sell hardware and software that’s packaged together for companies that want to build their own “private” clouds. Competitors in that business include traditional computer makers like IBM and Hewlett-Packard Co.

Microsoft, however, is also touting “hybrid” cloud services, in which it helps businesses carry out some functions in their own computer centers and lets them use Microsoft’s cloud when they need more capacity. That’s a strong selling point for Microsoft because most of its competitors focus on one segment or the other – not both, according to Gartner tech analyst Merv Adrian.

Even so, Adrian said Microsoft’s cloud business is a long-term investment. Commercial customers provide more than half of Microsoft’s revenue. And while many companies are finding cloud services to be convenient and economical, most still carry out the bulk of their operations on their own computers.

“It takes time to make the transition,” Adrian said.