The iPhone 7 was the world's best-selling smartphone during the first quarter, Strategy Analytics said Wednesday.

The research firm said it estimates Apple shipped 21.5 million iPhone 7 units during the quarter, giving the device a 6 percent share of the entire smartphone market.

"The iPhone 7 is by far the world's most popular smartphone model, due to a compelling blend of user-friendly design, extensive supporting apps, and widespread retail availability for the device," senior analyst Juha Winter said.

The iPhone 7 Plus was the second most popular phone, with 17.4 million units sold. Following the release of Apple's fiscal Q2 earnings, CEO Tim Cook said the iPhone 7 Plus was in such high demand that Apple had a hard time building enough units. That suggests the phone might have been able to outsell the iPhone 7 had enough units been available.

The third most popular smartphone was Chinese firm Oppo's R9s — which sold 8.9 million units — followed by the Samsung Galaxy J3 (6.1 million units) and Samsung's Galaxy J5 (5 million units.)

"Samsung was still gearing up for the launch of its new Galaxy S8 portfolio, but managed to get two models in the top five during Q1 2017," Strategy Analytics director Linda Sui said, noting the Galaxy J5 and Galaxy J3 helped "offset Samsung's troubles with the Note 7 battery fiasco."