Xiaomi has been knocked from the top of China's smartphone market by Huawei, according to new research, a setback for a company that was often feted as “the Apple of China.”

Research company Canalys called it a "remarkable feat" by Huawei, best known outside China for its network equipment, and one that puts Xiaomi under tremendous pressure to maintain its growth rate elsewhere in the world.

Xiaomi caught the world’s attention two years ago when it hired Hugo Barra, a former Google executive who managed the development of Android, to help it expand overseas.

Xiaomi was out-selling Apple in China at the time, and it built a cult-like following selling smartphones with high-end features at low prices.

But China’s smartphone market has matured, and local players like Huawei and ZTE, anther network vendor that once sold low-end handsets, have been moving up the food chain.

It’s the first time Huawei has led China's smartphone market. It’s shipments grew 81 percent year over year, Canalys said, while Xiaomi’s declined.

Huawei has won praise for a few new smartphones this year, including the P8 and the Mate S.

The research firm didn’t release its full market share figures, including where Apple stands in China; it said it would release its full report later this month.

China is the world’s biggest smartphone market — almost 100 million phones shipped there in the first quarter — but its growth started to slow this year for the first time in six years.

Xiaomi has often drawn comparisons to Apple, but not always in a good way. At a product launch last year, it was widely knocked for aping Apple’s marketing with a slide that read “One more thing…”

It has set itself a goal to sell 80 million phones worldwide this year. In September it said it was confident it would still reach that goal, after selling slightly less than 35 million handsets in the first half.