Apple has regained the top place in the smartphone market helped by the new iPhone 7 and 7 Plus, while rival Samsung Electronics grappled with the recall of its flagship Galaxy Note 7 over overheating batteries, according to a research firm.

The iPhone maker shipped 78.3 million smartphones in the fourth quarter for a market share of 17.8 percent in comparison to 77.5 million smartphones shipped by Samsung, which had a market share of 17.7 percent, Strategy Analytics said Tuesday.

For the full year, Samsung was the clear winner with shipments of 309.4 million smartphones to Apple’s 215.4 million, in part because Apple saw shipments of the iPhone drop in recent quarters.

Apple said earlier on Tuesday that it had sold more iPhones than ever before and set all-time revenue records for the device as well as the Mac, Apple Watch and its services business. For its fiscal 2017 first quarter ended Dec. 31, 2016, Apple said iPhone shipments were up by about 5 percent by units from the same quarter in the previous year. Revenue from phones was up 5 percent year-on-year at around US$54 billion.

The upside for Apple in the smartphone market going forward will be limited unless the company comes up with revolutionary new smartphone designs to address a market that is suffering iPhone fatigue, wrote Neil Mawston, executive director at Strategy Analytics, in an email. Apple “received an expected bonus from Samsung’s Note 7 fiasco in the fourth quarter of 2016,” and was able to pick up some Samsung customers and this helped lift its volumes, he added.

Samsung said this month that some 3 million Note 7 phones were affected by the recall.

A significant part of Samsung’s shipments consists of budget smartphones that the company ships to price-sensitive markets like India. Apple has tried to reach such customers by offering earlier models at lower prices and has recently tried to get permission from the Indian government for the import and sale of refurbished phones.

Strategy Analytics estimates that one in four of Samsung’s global smartphone shipments were low-end models in the fourth quarter, Mawston said. Samsung is the world’s biggest low-end smartphone vendor and has a strong presence in low-end smartphones across Africa, Asia and Latin America, he added.

Overall smartphone shipments grew in the quarter at 9 percent to 438.7 million units, Strategy Analytics said. Growth for the full year was 3.3 percent with close to 1.5 billion smartphones shipped in the year. “Smartphone growth is recovering slightly due to stronger demand in major developing markets like China and Africa,” said Linda Sui, director at Strategy Analytics, in a statement.

Three Chinese vendors – Huawei, Oppo and Vivo – followed Apple and Samsung in the top five ranking, with Huawei leading the pack with a 10 percent market share in the quarter. This is the first time Huawei has posted double digit market share, the research firm said.