The company reported a fourth quarter loss of $34 million, from a $32 million profit a year earlier. Revenue increased to $10.2 billion from $8.4 billion. For all of 2018, revenue rose 26 percent to $8.1 billion.
Maersk said it was helped last year by higher freight rates, greater efficiency in its operations, and synergies from the 2017 acquisition of German container shipping company Hamburg Sud.
However, it said its guidance for 2019 was "subject to considerable uncertainties due to the current risk of further restrictions on global trade and other factors impacting container freight rates, bunker prices and foreign exchange rates."
The Copenhagen-based group said trade tensions between the United States and China could weigh on business.
Maersk said the trade tensions had created uncertainty and could "reduce global container trade growth by 0.3-1.0 percentage points per year in 2019-2020 if U.S. tariffs are increased to 25 percent in March 2019."
Chief Executive Soeren Skou said that while group revenue had increased, "profitability needs to improve."
Shares were down nearly 10 percent in Copenhagen.