The global smartphone market is growing, but the spoils of this surge are not going to Apple and Samsung.

Instead, a trio of Chinese smartphone makers that are gobbling up market share are responsible for most of this growth, according to a new report from Gartner.

Apple’s smartphone sales were flat in Q1, a victory of sorts for a company that has seen sales fall for much of 2016. Samsung, by contrast, watched its sales tumble.

While these numbers highlight the global challenges the two market leaders face, it also means their problems in China, a once-promising market, are likely growing more acute. The next three biggest brands are Chinese names that get their sales primarily from their home market.

If these local brands’ rapid growth in China accounts for most of the global growth in smartphones, then Apple and Samsung must be getting squeezed pretty hard in the region. Worse, it appears some of these companies are making inroads into markets like India, where Apple in particular has now concentrated its efforts in hopes of finding a reliable source of growth.

“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 statement. “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.”

On the global level, consumers purchased 380 million units in the first quarter of 2017, up 9.1 percent from the same period a year ago. Even better: They seem willing to spend a bit more, which means average selling prices are trending up.

But the chief beneficiaries are all Chinese: Huawei, Oppo, and Vivo. Gartner noted that these three companies combined held a market share of 24 percent in Q1, up 7 percent from a year ago.

Samsung sold fewer phones — 78.6 million, down from 81.2 million for the same period a year ago — as its market share dropped to 20.7 percent, from 23.3 percent. Apple at least sold slightly more phones, 51.99 million, up from 51.6 million. But its market share fell to 13.7 percent, from 14.8 percent.

“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,” Gupta said.

Huawei was third, with 9.0 percent, up from 8.3 percent. Oppo was fourth, with 8.1 percent, up from 4.6 percent. Vivo was fifth, with 6.8 percent, up from 4 percent.

Of course, the success of these Chinese brands also meant that Google’s Android mobile operating system continued to widen its lead over iOS. Android had 86.1 percent in Q1, up from 84.1 percent a year ago.

Samsung is hoping that the Galaxy S8 and S8 Plus, which is says had solid preorders, will help at least stop the bleeding, if not trigger new growth. Apple, on the other hand, may be in a tougher spot for the next couple of quarters before its new phones are unveiled in September.