FedEx shares sank nearly 7% in extended trading Tuesday after the shipping giant reported weaker-than-expected earnings in the second quarter and lowered its guidance for the rest of the year.

Here's how the company did compared with Wall Street's expectations, according to Refinitiv consensus estimates:

Adjusted earnings per share: $2.51 vs. $2.76 expected

Revenue: $17.32 billion vs. $17.58 billion expected

On an unadjusted basis, the company's profit during the second fiscal quarter ended Nov. 30 fell to $560 million, or $2.13 per share, from $935 million, or $3.51 per share, in the same quarter last year.

After one-time accounting adjustments, including its integration expenses of TNT Express, FedEx earned $2.51 per share. Analysts had expected earnings of $2.76 per share.

Revenue also fell to $17.3 billion from the revenue of $17.8 billion in the year-ago quarter.

The shipping giant once again lowered its full-year earnings outlook. FedEx said it expects to earn between $10.25 and $11.50 per share on an adjusted basis, from its prior range of $11 to $13 per share. Wall Street, meanwhile, had expected full-year earnings of $12.03 per share, according to analysts polled by Refinitiv.

"Our revised guidance reflects lower-than-expected revenue at each of our transportation segments and higher-than-expected expenses driven by continued mix shift to residential delivery services," CFO Alan Graf Jr. said in a press release.

Graf added that the company will restrict hiring and implement reductions to its Express air network.

FedEx attributed the quarterly earnings miss to a number of factors, including weakening global economic conditions and the loss of business from "a large customer," presumably Amazon.

During the company's earnings call, Graf said that 60% of FedEx Ground's year-over-year margin decline was due to costs related to the rollout of its six- and seven-day delivery, online holiday sales shifting to the third quarter and the loss of Amazon volume.

Amazon's foray into its very own delivery capabilities has continued to threaten FedEx stock, as its shipping ties to FedEx weaken. Earlier this week, Amazon said it told its third-party sellers, which make up 58% of its total merchandise sales, that they will temporarily be restricted from using FedEx's ground and home delivery for Prime orders. The move came after FedEx ended its ground-delivery contract with Amazon in August, and its domestic express shipping contract in June.

Recent trade negotiation breakthroughs could also help buoy FedEx shares into the holiday quarter. On Friday, the U.S. and China reached a phase one trade deal that included some tariff relief. Though the exact terms of the deal are unclear, President Donald Trump tweeted that his administration would cut preexisting tariffs on $120 billion worth of Chinese imports from 15% to 7.5%, while maintaining its 25% tariffs on $250 billion worth of Chinese goods.

FedEx shares are up about 1% year to date.