Danish shipping giant A.P. Moeller-Maersk AS swung to a first-quarter loss and warned that rising trade tensions between the U.S. and China could cut container growth by up to a third this year.

Maersk’s warning adds to an increasingly bleak outlook for the container shipping industry, which now expects the tariff-filled trans-Pacific dispute to be a significant drag on earnings. Demand for shipping consumer goods, manufacturing parts and other anchors of global trade is waning at the start of the season when retailers typically stock up for the year-end holidays.