In 2014, Xiaomi took the lead in the world’s largest smartphone market, according to a new report from IDC.

Xiaomi ended 2014 on a very strong position in China, which, coupled with Samsung’s weakness, allowed Xiaomi to edge out the Korean company for the first place. While Xiaomi has been the leading phone brand in China in previous quarters, this is the first time the company founded by Lei Jun takes the crown for an entire year.

Diving into the data, we see that Xiaomi had a good Q4 2014, managing to cling to the first place, even under the onslaught of Apple and Huawei. Xiaomi has actually lost some share compared to Q3, but it more than doubled its slice of the market compared to a year before.

That Xiaomi managed to come ahead of Apple in Q4 is very impressive. The iPhone-maker had a huge quarter that benefited greatly from the pent-up demand for larger iOS devices, and China has been one of its strongest markets. Xiaomi, with its mix of affordable, yet decently specced devices, managed to sell 1.3 million units more than Apple.

The other interesting story here is Samsung’s continued decline. In Q4 2013, Samsung comfortably led the market with 18.8 percent, more than 5 percentage points ahead of runner-up Lenovo. Fast forward a year, and Samsung found itself on the fifth place with just 7.9 percent of the market. For the entirety of 2014, Samsung managed to keep the second place with 12.1 percent, but nonetheless, that’s a marked fall from 2013. Samsung’s poor showing in China has been cited as one of the key reasons the company has posted diminishing revenues throughout 2014.

Back to Xiaomi, the company started 2015 in force, with the release of the Mi Note and Mi Note Pro phablets and the recent introduction to the US public, where Xiaomi announced the upcoming opening of its online store in the United States. Xiaomi is already doing business in India and other developing markets in Asia, but China remains its pillar. Xiaomi leadership here is key to its amazing $45 billion valuation – investors are flocking to fund Xiaomi, and that means the company can expand in new areas and in countries very fast.