Amazon has been steadily growing its logistics operation over the last decade, and it now delivers more than half of all Amazon packages in the US, according to an estimate from Morgan Stanley published on Thursday and reported by CNBC. That’s a staggering increase over the course of the last few years. It means Amazon, which now operates its own freighters and cargo planes, is accelerating its push to own the entire logistics chain and end its relationship with companies like FedEx and UPS.

At the current rate, Amazon is set to pass both FedEx and UPS in US package volume, with the company currently delivering 2.5 billion packages per year compared to FedEx’s 3 billion and UPS’s 4.7 billion, Morgan Stanley says. Amazon’s number doubled in just the last year alone, from delivering about 20 percent of all of its own packages to now about half. A substantial contributing factor here is Amazon’s new one-day Prime shipping initiative, which it kicked off earlier this year and promises to bring to more markets and more products as time goes on.

“Customers love the transition of Prime from two days to one day — they’ve already ordered billions of items with free one-day delivery this year. It’s a big investment, and it’s the right long-term decision for customers,” CEO Jeff Bezos said of one-day Prime shipping on an earnings call in October. Amazon did not immediately respond to a request for comment regarding its package volume.

Amazon is delivering billions of packages a year and spending a fortune to do so

For Amazon, it’s not just about getting more packages to more customers at higher speeds. It’s also about owning everything from the arrival of a product at an Amazon factory (or the creation of the product from an Amazon subsidiary) to the so-called last-mile delivery to the customer’s doorstep, the latter of which has been especially difficult for commerce companies to crack.

Getting that package to someone’s home is primarily why Amazon has paid tens of billions to FedEx and UPS over the years. It’s also why the company is now distancing itself from those types of contracts, not just with the package companies, but with companies that transport products by sea and air. In 2016, Amazon launched its Prime Air brand, which encompasses both its in-progress delivery drone work and its fleet of cargo planes, and it’s been steadily adding more planes to its fleet over the years.

Earlier this year, Amazon and FedEx ended their contracts for ground shipping and air transport. Amazon still uses UPS, but it’s also been building out a network of its own delivery drivers under the Amazon Flex platform, which is a kind of on-demand contract network similar to Uber and food delivery companies like DoorDash. (Amazon Flex has been plagued by damning reports that the high demands it places on Flex drivers have directly contributed to automobile fatalities.)

All of this is naturally costing Amazon a fortune. The company said in October that in the three months spanning June to September, it spent 50 percent more — an eye-popping $9.6 billion — on fulfillment alone, due both to one-day Prime shipping and the general expansion of its retail operation in the US. But for Amazon, it’s a worthwhile expenditure if it means it can control the entire delivery chain from start to finish. At the appropriate scale, that would start saving Amazon money and allow it to become even more efficient at delivering products.