Chinese e-commerce behemoth Alibaba is leading a $1.38 billion equity investment in domestic parcel courier ZTO Express alongside Cainiao, Alibaba’s own logistics subsidiary, according to TechCrunch. After the investment, which the firms expect to finalize in early June, Alibaba, Cainiao, and its other co-investors will own about 10% of ZTO.

Alibaba Core Commerce RevenueBI Intelliengence

The companies have previously worked closely together — ZTOco-founded and still owns 1% of Cainiao, which is the third-party platform that routes all of Alibaba’s packages through several other parcel couriers. The deal is Alibaba’s fourth minority investment in a domestic logistics company, after it made similar investments in YTO Express, Best Logistics, and Huitongda Network over the last few years.

ZTO chairman Lai Meisong said the investment will allow the companies to better share resources and jointly explore new business opportunities. As part of the deal, ZTO will work with Alibaba and Cainiao to digitize large swaths of its logistics network. Separately, Cainiao plans to use AI algorithms to help route package deliveries to 40,000 rural villages, which it hopes will shorten delivery times by about 30%.

Additionally, it plans to put its e-shipping labels, which help track packages as they move through the delivery process, on 40 billion parcels annually by 2020. Working more closely with Alibaba could allow ZTO to take advantage of these technologies.

It’s also worth noting that Alibaba is making the investment as part of its “New Retail” initiative, an effort to blend online and in-store shopping. This initiative includes omnichannel fulfillment services and in-store pickup options, which the companies could work together to help better provide.

Alibaba is locked in a logistics spending race with JD.com, as it looks to stay ahead of its chief rival in rural China. The World Bank estimates that 43% of Chinese consumers live outside of urban areas. Many of these consumers are incredibly difficult for e-commerce and logistics companies to reach, since they’re often inaccessible via roads, meaning companies need to make massive infrastructure investments to access them.

Not to be outdone by Alibaba, JD Logistics, the logistics arm JD.comraised a whopping $2.5 billion earlier this year. It plans to use this money largely to similarly expand its ability to quickly serve rural Chinese consumers through new technologies, including drones and warehouse robots.

The companies’ massive spending won’t stop anytime soon, as the firm that succeeds in providing the fastest and most reliable deliveries to these consumers will likely capture the larger share of the rural Chinese market.