Starbucks wants customers in China to get their coffee anytime, anywhere.

The Seattle coffee chain is teaming up with Chinese tech giant Alibaba to launch delivery services in September, the companies announced Thursday.

The Alibaba (BABA) partnership "will reshape modern retail, and represents a significant milestone in our efforts to exceed the expectations of Chinese consumers," Starbucks (SBUX) president and CEO Kevin Johnson said in a statement.

Related: China is getting nearly 3,000 new Starbucks

Starbucks coffees and products will be available for order on Alibaba's food delivery platform Ele.me, and the coffee company will open "delivery kitchens" in Alibaba's Hema grocery stores to help brew and deliver Starbucks drinks. Everything can be paid for using Alibaba's payment platform, Alipay.

The delivery services will initially launch only in Beijing and Shanghai, but Starbucks aims to roll them out to 2,000 stores across 30 Chinese cities by the end of this year.

China has been a sweet spot for Starbucks for years. But in June, the company reported a sudden slowdown in China growth, just weeks after it had announced plans for rapid expansion in the country.

Morgan Stanley recently downgraded Starbucks, predicting a continued sales slump in China and the United States.

Related: The world's biggest Starbucks just opened in China

Starbucks is also facing pressure in China from an upstart domestic competitor.

Luckin Coffee opened its first store in China less than a year ago, and has quickly grown to having more than 500 outlets across major cities. Many of its customers pre-order coffees online, pick them up in store, and pay for them using Tencent's (TCTZF) WeChat Pay.

Luckin has also aggressively promoted its delivery services, and offers steep discounts to new customers. Luckin customers have to download the app to order coffee even when they show up to buy it in person.

-- Serenitie Wang contributed to this report.