Members of the media film the new iPhone 7 at an Apple store in Beijing, China, Sept. 16, 2016. REUTERS/Thomas Peter/File Photo

iOS achieved its strongest rate of growth in two years, the latest Kantar Worldpanel quarterly numbers show.

Data shows iOS grew 7 percent from last year, 33.5 to 40.5 percent in U.S. smartphone sales.

The iPhone 7 did well, even though it was available for less than the full quarter. The device was the top-selling phone at 10.6 percent of sales. The iPhone 6 and Samsung Galaxy S7 followed the iPhone 7 in sales, and the iPhone 7 Plus was the fourth at 5.3 percent, the firm said.

Apple’s success might be attributed to the recall of the Samsung Galaxy Note 7s after devices caught fire. Samsung suffered its worst decline in smartphone sales after problems with its Galaxy Note 7, tech research firm Gartner said in November. Samsung smartphone sales fell in the third quarter of 2016 by 14.2 percent year over year. This is the company’s worst performance ever, Gartner said. Samsung’s last similar poor performance in smartphone sales was in the fourth quarter of 2014 when it dropped by 12.3 percent.

But Kantar says U.S. customers saw the removal of the headphone jack on the iPhone 7 as a non-issue.

iOS is doing well in global markets, data shows. Japan was at the top of the list of regions where iOS holds the greatest share, with 51.7 percent of sales. The UK followed with 44 percent, and the U.S. at 40.5 percent.

“iOS achieved year-on-year growth across most regions in EU5 except Germany, where it fell 2.7% points to 16.5% of smartphone sales,” said Dominic Sunnebo from Kantar Worldpanel ComTech Europe. “iPhone 7 cracked the top 10 smartphones sold in all regions but Spain, which remains dominated by the Android ecosystem at 91.7% of all sales.”

Although Android remains the dominant OS in America with 57.9 percent of phone sale, the latest numbers show the fifth consecutive year-on-year period decline. However, Android sales grew across other regions except the U.S. and in Japan.