Apple's losing streak is finally over.
Apple's (AAPL) sales started growing again in the December quarter, driven by stronger demand for the iPhone. It had reported three consecutive year-over-year sales declines.
The company's sales hit $78.4 billion for the quarter, a new record high. Apple sold 78.3 million iPhones for the quarter, beating its previous record from the same quarter a year earlier of 74.8 million.
Tim Cook, Apple's CEO, credited the surge in part to "especially strong demand for iPhone 7 Plus," the larger and pricier iPhone model.
The holiday quarter is typically Apple's biggest as it marks the first full three-month period after the new iPhone goes on sale in September.
The stock jumped nearly 3% in after hours trading Tuesday following the earnings release.
Apple's annual sales fell in the 2016 fiscal year for the first time since 2001 as iPhone sales, still the majority of its business, declined in three consecutive quarters.
Many analysts have raised concerns that the global smartphone market is saturated. Customers are taking longer to replace their phones. And Apple's latest iPhone is a dead ringer for the previous two models, eliminating some of the desire to upgrade.
The latest iPhone was thought to get a bump in recent months from the massive recall of Samsung's Galaxy Note 7 over an exploding battery issue.
Related: Here's what tech execs are saying about Trump's immigration ban
Apple's sales were also boosted by growth in its closely watched Services division, which includes Apple Pay, AppleCare and digital content. The division's sales topped $7 billion for the quarter, up 18% from the previous year.
However, there were some concerning details in the report. Apple's iPad revenue fell 22% from a year earlier, continuing a downward spiral for the product. Apple's sales in Greater China, once thought to be its next big market, also fell 12%.
The earnings report comes at a tense time for the company. Apple now finds itself in the cross hairs as President Trump pushes to overhaul trade agreements, immigration policy and crack down on overseas manufacturing.
During the campaign, Trump said he would "get Apple to build their damn computers and things in this country instead of in other countries."
After winning the election, Trump said he told Cook that it's his "ambition" to have Apple "build a great plant, your biggest and your best" in the U.S.
Apple was also one of many technology companies to express "deep concerns" this weekend over Trump's executive order putting a travel ban in place affecting seven Muslim-majority countries.
"Apple would not exist without immigration, let alone thrive and innovate the way we do," Cook said.
On the other hand, Trump has pledged to make it easier for companies like Apple to bring money held overseas back to the U.S. by significantly lowering the taxes on it.
Apple is currently sitting on $246 billion in cash and marketable securities, most of which is held overseas.
"I am optimistic given what I'm hearing that there would likely be some sort of tax reform this year and it does seem like there are people in both parties that would favor a repatriation as part of that," Cook said on a conference call with analysts after the earnings release.
Cook declined to say what the money would be used for if brought back to the U.S., but said Apple is "always looking at acquisitions."