With Apple reporting all-time record high iPhone sales and revenue in its earnings call yesterday, IDC’s latest data out today confirms that the company surpassed Samsung to take the top spot in the fourth quarter of last year. That was despite, as IDC notes, a first full year of decline for iPhone with a 7% drop year-over-year for 2016:

The best 4K & 5K displays for Mac

“This was a year that brought us the first down year for iPhone, yet Apple closed out the holiday quarter by surpassing Samsung for the top spot in the smartphone industry. We also witnessed year-over-year declines in some emerging regions like the Middle East and Latin America where high growth was expected. To round it all off, we now have a three horse race at the top of the market as Huawei cracked the double-digit share mark for the first time ever.”

Apple’s iPhone sales of 78.3 million units in the fourth quarter was a 4.7% year-over-year increase for the quarter, but Apple also benefited from a rare 14th week this year that it noted during its earnings call with investors yesterday. While Apple mentioned the 14th week, giving the company an extra week of iPhone sales that could have potentially accounted for the record units shipped, the company said the added benefit was offset by channel inventory growth, a stronger U.S. dollar, and year-ago revenue that included a 1-off $584 million patent infringement payment.

“We had the benefit of a 14th week during the quarter this year, but this was offset by four factors. First, this year we grew China inventory significantly less than a year ago. Second, iPhone 7 launched earlier in the September quarter compared to the iPhone 6s launch the previous year, creating a more difficult comparison for the December quarter this year. Third, the stronger U.S. dollar affected total revenue growth this year by 100 basis points. And fourth, our year-ago revenue included the benefit of a one-off $548 million patent infringement payment. Also, strong customer interest left us in supply/demand imbalance for several of our products throughout the quarter this year.”

Samsung, in comparison, shipped 77.5 million units during the important holiday quarter, a 5.2% drop from the same quarter last year. And third-place Huawei shipped 45.4 million, accounting for a 38.6% year-over-year increase in sales as other Chinese manufacturers OPPO and vivo took the 4th and 5th spots both with over 100% year-over-year increases.

idc-jan-2017-3

But while Apple surpassed Samsung in the fourth quarter, Samsung comes out on top for 2016 overall with 311.4 million units shipped versus 215.4 million for Apple in second position and 139.3 million for Huawei in third:

idc-jan-2017-2

IDC notes in its full report that Samsung’s decline in the fourth quarter meant its worldwide market share dropped below 20% for the first time in four years.