Amazon.com Inc. could take as much as a 30 percent stake in a large cargo carrier, its second such deal this year as the e-commerce giant seeks to control more of the delivery process, from factories where goods are made to the doorsteps of customers. As part of the agreement, Atlas Air Worldwide Holdings Inc. will acquire and operate 20 Boeing Co. 767-300 freighters for Amazon, according to a statement from the airline Thursday. The deal mirrors a March transaction with Air Transport Services Group Inc. and would double Amazon’s cargo-hauling fleet to 40 Boeing 767 freighters. The Seattle-based retailer is moving quickly to build up its delivery network, aiming to reduce its dependence on United Parcel Service Inc. and FedEx Corp. as it expands its Prime membership service that delivers some orders in as little as one day. In light of the company’s aggressive moves, the question for some analysts is how much Amazon intends to encroach on the package carriers’ turf. “The debate right now is where will Amazon stop and if this is meant to complement or substitute the legacy parcel carriers,” Morgan Stanley analysts Ravi Shanker and Brian Nowak wrote in a note. “We believe UPS/FDX need to at least keep one eye on the rear-view mirror.” On an earnings conference call last week, Amazon Chief Financial Officer Brian Olsavsky reiterated that Amazon was looking to supplement, not replace, the capacity of its delivery partners. Kelly Cheeseman, an Amazon spokeswoman, declined to comment beyond Atlas’s statement. Even a small fleet of planes will help Amazon reduce costs, said Jarrett Streebin, chief executive officer of EasyPost, a San Francisco company that helps retailers coordinate shipping labels and tracking with delivery companies. Reducing Inventory Amazon can use the planes to quickly move inventory—especially small electronics—around the country to respond to demand spikes, which will ease its reliance on FedEx and let it meet demand with less inventory, Streebin said. The planes help the company accomplish speedy delivery without the cost of abundant inventory in each warehouse around the country, he said. “It’s clearly about cutting out FedEx, and could help them manage their inventory,” Streebin said. “FedEx is probably squeezing hard.” Shares of Purchase, New York-based Atlas surged as much as 51 percent, the biggest intraday increase on record since the shares were listed in July 2004 after the company emerged from bankruptcy protection. The stock was up 27 percent to $49.09 at 1:59 p.m. in New York. Atlas also reported adjusted first-quarter earnings of 31 cents a share, exceeding the 26-cent average analyst estimate. The Amazon deal would transform Atlas, which operates a global air cargo network as well as a leasing operation that supplies customers with airplanes, flight crews and maintenance. The partnership is expected to begin later this year and expand to full operation by 2018, Atlas CEO William Flynn said on a conference call. Under the terms of the transaction, Atlas is increasing its aircraft fleet by 40 percent from 49 planes it owned or leased at the close of 2015. Because the company’s fleet is dominated by Boeing 747 jumbo jetliners, Atlas only had two of the 767 freighter model favored by Amazon and is shopping for passenger jetliners to be converted into package-haulers. Amazon was granted warrants to acquire as much as 20 percent of Atlas’s common stock at $37.50 a share over a five-year period, with an option for an additional 10 percent at the same price over seven years. Amazon gained the right to buy as much as 20 percent in Air Transport Services as part of the March agreement to lease planes. Transport Expansion Amazon has been quietly building out its transport strategy for years. A 2013 report to senior management proposed an aggressive global expansion of the company’s Fulfillment By Amazon service, which provides storage, packing and shipping for independent merchants selling products on the company’s website. “The natural step for Amazon is controlling more of its own transportation and logistics, including additional air cargo and other transportation/operations, as these are almost a necessity to continue the rapid expansion of Prime and Prime Now,” Colin Sebastian, an analyst at Robert W. Baird & Co., wrote in a note to investors.