Huawei, the Chinese smartphone maker, is closing in on Apple Inc. (AAPL) and Samsung Electronics (SSNFL) in the smartphone market, narrowing the gap in sales during the first quarter of this year.

That’s according to research firm Gartner, which is out with a new report looking at sales of mobile phones for the first three months of 2017. While Samsung took back the top spot with unit shipments of 78.7 million and Apple was in second with close to 52 million units shipped, Huawei was growing closer with 34.2 million units shipped, controlling 9% of the market. That compares to 8.3% share for Huawei in the year-ago first quarter. Samsung holds a 20.7% market share while Apple is at 13.7%, according to the research firm. (See also: Report: Apple's #1 Rival? It's Huawei, Not Samsung.)

"The top three Chinese smartphone manufacturers are driving sales with their competitively priced, high quality smartphones equipped with innovative features," said Anshul Gupta, research director at Gartner, in a press release introducing the research. "Furthermore, aggressive marketing and sales promotion have further helped these brands to take share from other brands in markets such as India, Indonesia and Thailand."

Paying More, Getting More

Global smartphone sales came in at 380 million units for the March-ended quarter, marking a 9.1% jump from a year ago. Gartner said mobile phone average selling prices also increased as consumers were inclined to spend more on devices that have more features. That shift bode wells for Huawei and other Chinese handset makers who have embraced strategies to develop feature-rich phones at affordable price points. Still, Gupta warned while Huawei is holding its own among the likes of Samsung and Apple, the other Chinese smartphone makers are also catching up.

In the case of Samsung, which lost its first-place status last year after the costly and embarrassing recall of the potentially dangerous Galaxy Note 7, the South Korean electronics maker was able to take back its leading position although mobile phone sales were down 3.1% year over year in the first quarter. (See also: Samsung Has Another Galaxy S8 Problem.)

"Although Samsung announced that preorders for the Galaxy S8 and S8 Plus are up 30 percent year over year, the absence of an alternative to Note 7 and the fierce competition in the basic smartphone segment are leading Samsung to continuously lose market share," said Gupta in the release. "Sales of iPhones were flat, which led to a drop in market share year over year. Similar to Samsung, Apple is increasingly facing fierce competition from Chinese brands Oppo and Vivo, among others, and its performance in China is under attack."

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.