The global smartphone market grew 19 percent (year-over-year) but declined by 7 percent quarter-over-quarter as 329 million units were shipped led by Samsung, a report said on Thursday.

Samsung retained the number one spot with shipments reaching 58 million units in Q2 2021, however, its market share declined to 18 percent as compared to 22 percent in Q1 2021 as its shipments declined by 24 percent quarter-over-quarter.

According to market research firm Counterpoint, Xiaomi eclipsed 50 million smartphones, becoming the world’s second-largest smartphone brand for the first time.

“Xiaomi had its best-ever quarter as it was able to increase its market share in China, Southeast Asia, and Europe,” Tarun Pathak, OEM rankings, Research Director, said in a statement.

Xiaomi recorded quarter-over-quarter shipment growth of 8 percent while its shipments grew by a staggering 98 percent year-over-year.

Meanwhile, Apple’s smartphone shipments fell by 18 percent quarter-over-quarter but grew by 30 percent year-over-year to reach 48.9 million units in Q2 2021.

“While Apple fell to the third spot, it captured record second-quarter shipments thanks to persistent demand and supply for its iPhone 12 series,” Pathak said.

OPPO’s shipments declined by 12 percent quarter-over-quarter to 33.6 million units in Q2 2021. Vivo’s shipments declined by 8 percent quarter-over-quarter but grew by 44 percent year-over-year to reach 32.5 million units in Q2 2021.

Among other major OEMs, OnePlus, realme, and Lenovo Group grew the fastest.