NEW YORK (AP) — FedEx said Tuesday that its profit fell 40% in its most recent quarter, hurt by higher costs, a shorter holiday shipping season and its move to cut ties with online shopping giant Amazon.

The package delivery company also cut its earnings expectations for the year. Its stock tumbled almost 7% in after-hours trading Tuesday.

Fred Smith, the company’s CEO, called the current fiscal year one “of continued significant challenges and changes for FedEx.”

Smith said the fiscal second quarter was an “anomaly” because of the shorter holiday season. Thanksgiving this year was six days later than last year, making it the shortest stretch between Thanksgiving and Christmas since 2013. FedEx said it needed more drivers and package handlers to deliver packages faster, increasing costs. It also pushed Cyber Monday, the busy online shopping day, into the company’s fiscal third quarter.

ADVERTISEMENT

FedEx also took a hit from its recently soured relationship with Amazon, which is building its own delivery fleet that could threaten traditional delivery companies.

Amazon has leased jets, built package-sorting hubs at airports and launched a program to let its contractor drivers start their own businesses delivering packages in vans. A recent report by Morgan Stanley estimated that Amazon is delivering half of its packages itself.

FedEx severed ties with Amazon earlier this year, saying it wouldn’t make ground or air deliveries for the online shopping giant. Then this week, Amazon temporarily banned its third-party sellers from using FedEx’s ground service to ship to its Prime members, citing concerns about whether the deliveries would show up in time for Christmas.

FedEx said the loss of volume from Amazon hurt it in the fiscal second quarter more than the previous one because its ground contract with Amazon ended in August.

On Tuesday, FedEx reported net income of $560 million, or $2.13 per share, in the three months ending Nov. 30. That’s down from $935 million, or $3.51 per share, in the same period a year before.

Adjusted earnings for the fiscal second quarter came to $2.51 per share, missing Wall Street expectations of $2.79 per share, according to Zacks Investment Research.

Revenue fell 3% to $17.3 billion, which also fell short of expectations.

The Memphis, Tennessee-based company now expects earnings for its fiscal year that ends in May between $10.25 per share and $11.50 per share, down from its previous forecast of $11 to $13 a share.