Global smartphone shipments totaled 342 million units in the second quarter of 2018, down 1.8% from a year, according to IDC. The drop marks the third consecutive quarter of year-over-year declines for the global smartphone market and only the fourth quarter of decline in history.

Samsung remained the leader in the worldwide smartphone market despite a 10.4% on-year decline in shipments to 71.5 million units in the second quarter. The Korea-based company's global market share dipped to 20.9% in the second quarter compared to 22.9% a year ago.

Huawei surpassed Apple for the first time to move into second place with a 15.8% share globally, IDC said. The company shipped 54.2 million units in the second quarter, up 40.9% on year. It also continued to lead the China smartphone market with a record-high market share of 27% in second-quarter 2018.

Apple dropped to the third spot for the first time despite its second quarter growth. Apple shipped 41.3 million iPhones, representing modest growth of 0.7% over the 41 million units shipped a year ago. Apple took a 12.1% share in the quarter, up from 11.8% a year earlier. Apple will look to regain control of the market this fall with the expected launch of three next-generation iPhone models.

Xiaomi's shipments increased 48.8% on year to 31.9 million units in the second quarter, accounting for a 9.3% share. It has pulled ahead of Samsung for the top position in India over the past few quarters and has now closed the gap with Samsung in Indonesia.

Oppo faced a slowdown in key markets like India and most of Southeast Asia as it eased back on its aggressive marketing and sales activities in the region. Despite this, the company still managed to ramp up its shipments 5.1% on year to 29.4 million units for an 8.6% share.