The busiest port complex in the U.S. is churning through import volumes near the highs set during the pandemic despite worries about a cooling economy.

The ports of Los Angeles and Long Beach, which account for roughly a third of all U.S. container imports, had their third-strongest month ever in July, just shy of an all-time high reached in May 2021. Back then, a wave of inbound consumer goods caused supply bottlenecks on land and a queue of cargo ships waiting for a berth offshore was getting longer by the day.

Demand now is driven by retailers and other importers that are stocking up ahead of U.S. tariffs on Chinese goods and a possible strike by a large group of American dockworkers — adding to the usual frenzy of pre-holiday ordering that occurs this time of year.