NEW YORK (AP) — The nation’s trade deficit reached a record $140.5 billion in March as consumers and businesses alike tried to get ahead of President Donald Trump’s latest and most sweeping tariffs, with federal data showing a stockpiling of pharmaceutical products.

The deficit — which measures the gap between the value of goods and services the United States sells abroad against what it buys — has roughly doubled over the last year.

In March 2024, Commerce Department records show, that gap was just under $68.6 billion.

According to federal data released this week, American exports for goods and services totaled about $278.5 billion in March, while imports climbed to nearly $419 billion. That’s up $500 million and $17.8 billion, respectively, from February trade.

Consumer goods led the imports increase, growing by $22.5 billion in March. Pharma products in particular climbed $20.9 billion, the U.S. Census Bureau and Bureau of Economic Analysis noted, signaling that drugmakers sought to get ahead of Trump’s threats to slap tariffs on the sector.

Because pharma accounted for so much of the surge, the big rise in imports doesn’t necessarily mean other sectors used March to stockpile in the same way. Retailers, for example, may not have bought as many clothes, toys and furniture from abroad, perhaps because they already were feeling the effects of previously-implemented levies, some analysts say, or because they decided to hold off on rushing in new inventory amid uncertainty.

Still, imports of “capital goods,” such as computers, as well as automotive parts and cars, also increased in March. Yet industrial supplies and materials, such as metal and crude oil coming into the United States, fell as steel and aluminum tariffs and other levies impacting energy took effect. Service-based imports such as travel also decreased.

Overall, imports are flooding into the United States for products that have or are feared to soon be caught in the crosshairs of the ongoing trade wars. Since taking office in January, Trump has threatened and imposed a series of new tariffs.

The recent surge in imports reflects efforts by companies across the country to bring in foreign goods before more duties kicked in. New orders for manufactured durable goods, for example, jumped 9.2 percent to $315.7 billion in March, Census Bureau data released last month shows.

March’s trade deficit surpasses the last monthly record of $130.7 billion reported in January, also amid tariff uncertainty after Trump took office, marking a more than $32 billion jump from December.

All of that contributed to shrinking economic growth in the first three months of the year.

Last week, the Commerce Department reported that the U.S. gross domestic product — or output of goods and services — fell at a 0.3 percent annual pace from January through March, marking the first drop in three years.

Imports grew at a total 41 percent pace for that period, its fastest rate since 2020, shaving 5 percentage points off first-quarter growth.