Apple’s iPhone had its strongest market share gains in two years at the end of October, new research shows.
The iOS device accounted for 40.5% of all smartphone sales in the U.S. during the three-month period ended October, according to data released on Wednesday by Kantar Worldpanel ComTech. That was up from 33.5% share of smartphone sales during the same period in 2015, according to the research firm. That’s the strongest year-over-year growth Apple (AAPL) has witnessed in the last two years and the greatest number of sales share since the three-month period ended January 2015.
Android devices still reign supreme in the U.S., collectively accounting for nearly 58% of all smartphone sales.
Get Data Sheet, Fortune’s technology newsletter
While the iPhone is still trailing Android devices, Apple’s success during the period might have been due in part to the troubles Samsung endured during the same period.
In August, Samsung released the Galaxy Note 7 in hopes of competing against the iPhone 7 that would launch in September. However, the smartphone fell victim to manufacturing troubles that caused it to overheat and in some cases, explode. After a recall, replacement devices suffered from the same problem, leading Samsung to discontinue the handset. The Galaxy Note 7 had been expected by some industry watchers to sell exceedingly well. Apple could have benefited from that.
Still, there’s more to the iPhone’s success during the period than Samsung. Kantar’s consumer insight director Lauren Guenveur noted that the iPhone 7 proved exceedingly popular. The analyst said in a statement that the smartphone’s “lack of the headphone jack has proved to be a non-issue for U.S. iPhone consumers.” Apple’s iPhone 7 was the top-selling smartphone during the period.
In addition, Guenveur said Apple benefits from being Apple.
For more about Apple iPhone, watch:
“While Android dominates in terms of the raw number of devices it powers, Apple remains the most desirable smartphone brand in the world,” the analyst said.
Moving away from Apple, Kantar noted that Google’s Pixel smartphone, the first to be designed and engineered by Google (GOOGL), accounted for 0.5% of all smartphone sales during the three-month period ended October. That put Google’s handset on equal footing with smartphones from popular competing brands, like China-based Huawei.