People line up at an Apple store shortly before it opens in Beijing, China, January 3, 2017. REUTERS/Thomas Peter

Apple Inc. returned to growth in the quarter ended Dec. 31 following three consecutive quarters of sales declines. The company’s record quarterly revenue was lifted by strong iPhone sales, paced by strong demand for the iPhone 7+.

While both iPhone and Mac sales fared better than expected, sales of iPads and declined versus the year ago quarter, Apple said.

Kevin Krewell, principal analyst at Tirias Research, said a higher than normal number of “switchers” from Android to Apple during the quarter—the first quarter of Apple’s fiscal 2017—may have been related to rival Samsung Electronics Co. Ltd.’s disastrous Galaxy Note 7 recall last year.

Tim Cook, Apple’s CEO, said in a conference call following the quarterly report that the fiscal first quarter was also a record quarter for Apple Watch in terms of both revenue and sales. “We couldn’t be more excited about Apple Watch,” Cook said.

Apple reported record quarterly revenue of $78.4 billion, up 3 percent from the same period of 2015. The company reported a net income for the quarter of $17.9 billion, a decline of 3 percent versus the year ago period.

Apple said it sold 78.3 million iPhones during the quarter, up from 74.5 million in the first quarter of fiscal 2016. Mac sales reached 5.,374, up from 5,312 in the year ago quarter. IPad sales declined to 13.1 million, down from 16.1 million in the year ago quarter.

Apple’s fiscal first quarter results beat consensus analysts’ expectations for both revenue and profit, as well as iPhone sales.

“The Apple story remains the company’s ability to keep and slightly grow its iPhone installed base and how it can sell those customers more services and related products,” Krewell said. “:And to date, it been really good at that.”

According to a recent report by Strategy Analytics, Apple regained the top spot in smartphone sales in the calendar first quarter, out shipping Samsung in part due to the Galaxy Note 7 fiasco.

Cook also commented on Apple’s recent legal action against chip vendor Qualcomm Inc. over patent licensing. Apple maintains that Qualcomm charges royalties based on the cost of its handsets, an unusual practice.

Cook, who has said before that he does not like litigation, said Qualcomm “insisted on charging royalties for technologies they had nothing to do with.

“We were in a situation where the more we innovated, the more we had to pay them,” Cook added.

Apple said it expects sales for the current quarter to be between $50 million and $53 million. The company’s sales for the second quarter of fiscal 2016 totaled $50.6 million.

Receive latest electronics news and products in your inbox
Weekly alerts and exclusive articles, products and free webinars
Your email will not be shared with anyone else