China’s Xiaomi rockets up the ranking to clinch fourth spot, Canalys says.

Huawei edged ahead of Apple in the Central and Eastern European (CEE) smartphone market in the second quarter, according to stats released by Canalys this week.

The research firm said the Chinese kit maker shipped 1.8 million handsets in the region during the three months to 30 June, out-shipping its U.S. rival by fewer than 50,000 units.

"Huawei slipped behind Apple briefly in Q1 2017," said Ben Stanton, Canalys analyst, in a research note on Tuesday. "Apple did an excellent job of upselling its installed base to the iPhone 7 Plus, whereas Huawei suffered from the fallout of its extremely aggressive end to 2016."

He explained that Huawei’s inventory built up last year, but that has now largely cleared.

"Huawei is back, growing 11% in Q2 2017," Stanton said. "It is firing on all cylinders."

Samsung still sits top though, shipping 4.9 million smartphones in CEE, thanks to the popularity of its Galaxy A and J smartphones. However, the appetite for its flagship Galaxy S8 is not quite as strong, Canalys said.

The standout performer during Q2 was Xiaomi, Canalys said, which came from nowhere to ship 1.1 million units, grabbing 7% of the CEE smartphone market, which was good enough for fourth spot.

"Xiaomi wants to replicate Huawei’s success," said Tim Coulling, senior analyst at Canalys.

However, unlike Huawei, which uses its origins as a network vendor and white label phone supplier to build relationships with carriers, Coulling said Xiaomi is working with distributors to get its handsets into as many retailers as possible.

This is particularly evident in Poland, where Xiaomi partnered with local distributor ABC Data, "which has quickly scaled Xiaomi smartphones into Poland’s largest e-commerce platform, Allegro, and major retailers, such as Media Markt, Media Expert, and Komputronik," Coulling said.