Sales of Apple’s iPhones fell at their steepest-ever rate, according to data for the three months to the end of March.
The firm said revenue from the iPhone dropped by 17%, compared with the same period a year earlier, to $31bn.
However, Apple chief executive Tim Cook said sales were stronger towards the end of March, including in China where it cut iPhone prices to boost demand.
Apple lifted its outlook for the three months to June.
That sent shares more than 5% higher in after-hours trading.
The company had warned of slowing iPhone sales earlier this year, especially in China, where Apple competes with cheaper rivals such as Huawei Technologies and Xiaomi.
But Mr Cook said price adjustments in China, lower Chinese taxes on the iPhone and new trade-in and financing deals helped sales start to recover toward the end of the quarter.
He also credited improving demand for products such as the Apple Watch, along with progress in US-China trade talks.