International Business Machines recorded its highest quarterly sales growth in more two years and beat Wall Street targets.
The company was boosted by its bets in the high-margin cloud computing business.
IBM's finance chief James Kavanaugh said cloud spending by clients in retail, manufacturing and travel industries in the US was picking up after the initial pandemic-driven slump.
Sales from its cloud computing services jumped 21% to $6.5 billion in the quarter.
The 109-year-old firm is preparing to split itself into two public companies, with the namesake firm narrowing its focus on the so-called hybrid cloud, where it sees a $1 trillion market opportunity.
"Big Blue" recorded a sales decline in global technology services, its largest unit.
But that was largely offset by a rise in revenue in the remaining three units, including a surprise growth in the business that hosts mainframe computers.
Mainframe saw strong traction from the financial services industry, where its banking clients shopped for more capacity as trading volumes soared during the retail trading frenzy, CFO Kavanaugh said.
"I am glad to see that strategic projects, which are IBM's bread and butter, are coming back," said Patrick Moorhead, analysts at Moor Insights & Strategy, adding that systems and global business services growth was a surprise.
"This is a good start to the year for the company who is all-in on the cloud," he added.
IBM's total revenue rose nearly 1% to $17.73 billion in the quarter, beating analysts' average estimate of $17.35 billion, according to IBES data from Refinitiv.
Net income fell to $955m, or $1.06 per share, in the quarter ended March 31, from $1.18 billion, or $1.31 per share, a year earlier.
Excluding items, the company earned $1.77 per share, beating market expectation of $1.63.