NEW YORK (AP) — FedEx is severing ties with Amazon as the online retailer builds out its own delivery fleet and becomes more of a threat.

The announcement Wednesday that FedEx would no longer make ground deliveries for Amazon comes two months after the delivery company said it was terminating its air delivery contract with Amazon.

Amazon.com Inc. is building up its own fleet of air and ground transportation to have more control of how its packages are delivered and cut its reliance on FedEx, UPS and the U.S. Postal Service. The Seattle-based company has been leasing jets, building several package-sorting hubs at airports and has launched a program that lets contractors start businesses delivering packages in vans stamped with the Amazon logo.

Last month, FedEx warned for the first time in a government filing that Amazon’s fledging delivery business could hurt its revenue and “negatively impact our financial condition and results of operations.”

At the same time, e-commerce has become a priority for retailers like Walmart and Target, meaning that FedEx can distance itself from Amazon.com without suffering the same competitive damage it might once have. FedEx said that Amazon made up just 1.3% of its total revenue in 2018, or about $850 million.