FILE PHOTO: A cup of coffee rests on a counter at a Starbucks coffeehouse in Austin, Texas, U.S., February 10, 2017. REUTERS/Mohammad Khursheed/File Photo

(Reuters) - Coffee chain Starbucks Corp SBUX.O said on Thursday it would buy the remaining 50 percent share of its East China business from its joint venture (JV) partners for about $1.3 billion, in its biggest ever acquisition.

China is Starbucks’ fastest-growing market outside the United States by number of stores.

The cash deal will give Starbucks ownership of about 1,300 stores in Shanghai and Jiangsu and Zhejiang provinces, and aligns with its target of operating 5,000 stores in mainland China by 2021.

Shanghai has almost 600 Starbucks outlets, the largest number in any city. It will also be the first city outside the United States to have a coffee roastery and tasting room, set to open in December this year.

Starbucks is contending with a slowdown in in-store traffic back home as it works to speed up service at its cafes, where a large number of mobile orders had led to congestion and delays in serving orders.

Starbucks is buying the East China stores from JV partners Uni-President Enterprises Corp 1216.TW (UPEC) and President Chain Store Corp 2912.TW (PCSC).

In a separate deal, Starbucks will sell its 50 percent stake in its Taiwanese JV to UPEC and PCSC for about $175 million. The Taiwan JV operates about 410 Starbucks stores.

Both deals are expected to close by early next year.

Shares of Starbucks, which is scheduled to report third-quarter earnings on Thursday after the bell, were up marginally in premarket trading.