Lei Jun, founder and CEO of Xiaomi, speaks during a news conference in Beijing last year

People in China are buying fewer smartphones, but Xiaomi thinks the shifting market is an opportunity: It wants to regain its position as the country’s best-selling smartphone brand within two and a half years.

Speaking to employees, Xiaomi founder and CEO Lei Jun said, “The market is consolidating while the competition becomes more and more brutal. There is no turning back for us and we have to charge forward... only by winning China can we win in the rest of the world.”

Xiaomi lost its place as China’s top smartphone maker in 2016. Research firm IDC says it now ranks fourth, behind Huawei, Oppo and Vivo. But there are signs that Xiaomi is re-gaining momentum: It climbed back into the top five global smartphone vendors last year.

Xiaomi began expanding into Western Europe in November when it started selling phones in Spain. It’s also returning to Indonesia, a market it previously abandoned due to supply chain issues.

Large, emerging markets like Indonesia have long been at the heart of Xiaomi’s strategy. The company still doesn’t sell phones in the United States. Instead, last year it overtook Samsung as India’s top smartphone seller.