FedEx posted weak quarterly results in its core express business and warned Tuesday that its profit in the year ahead will be crimped by slowing growth in the world economy and its decision to drop a contract with retail giant Amazon.

The delivery company reported a quarterly loss of nearly $2 billion. However, excluding an accounting charge for retirement plans and other items that the company doesn't expect will repeat, the results were better than Wall Street expected.

FedEx started a new fiscal year this month, and Chief Financial Officer Alan Graf said the company's performance, especially at FedEx Express, is being hurt by continued weakness in global trade and industrial production. CEO Fred Smith echoed the comments on a Tuesday conference call to discuss the results.

Get Breaking News Delivered to Your Inbox

"Global trade disputes and low global growth rates create significant uncertainty for the express business leading us to be cautious," Smith said on the call.

FedEx shares fell $4.92, or 3.1%, to close Tuesday at $155.98 before the release of the results. Shares rose about 1% in early Wednesday trading.

Amazon contract

The company announced this month that it would not renew an airfreight-delivery contract with Amazon that expires June 30. It did not disclose the value of that work, but said Amazon accounted for less than 1.3% of its revenue in 2018.

FedEx also finds itself in the middle of a trade dispute between the U.S. and China. On Monday, the company sued the Commerce Department , seeking to stop it from enforcing export rules that restrict shipments to, among others, Chinese telecommunications-equipment maker Huawei Technologies. Huawei was recently added to a list of companies barred from receiving U.S. technology without a special license from the Commerce Department.

In the fiscal fourth quarter, which ended May 31, FedEx reported a loss of $1.97 billion, compared with profit of $1.13 billion a year earlier.

FedEx said that adjusted profit excluding various charges was $5.01 per share. While down from $5.91 a year earlier, the results beat expectations. The average estimate of 11 analysts surveyed by Zacks Investment Research was for $4.81 per share.

Revenue rose 3% to $17.81 billion, which met the analysts' forecasts.

The company's biggest business, express, saw lower revenue from international priority packages, and the unit's operating income slid by 12% on a 1% dip in sales.

FedEx Ground

FedEx Ground ran into rising costs as it shifted to a year-round schedule of six days a week. The company plans to go seven days a week starting next January. The unit's income was flat despite 11% higher revenue.

"The quarter was a mixed bag," said Matt Arnold, an analyst with Edward Jones. "Ground continues to perform well, freight continues to perform well, but unfortunately on the international side the express business is still under pressure — essentially no change from what we saw a quarter ago."

For the year, FedEx, which is based in Memphis, Tennessee, reported profit of $540 million on revenue of $69.69 billion.