Minnesota exports grew slightly during the first three months of the year despite a trade war that led to a 13% drop in shipments to China.

A surge in exports to Mexico and Europe more than picked up the slack, state officials said Thursday.

Minnesota exports grew 1.5% to $5.4 billion for the quarter ended March 31. The state results, led by demand for medical, optical and machine products, edged the U.S. export growth rate of 1.4%.

Minnesota’s goods to Europe rose 14%, while goods exported to Mexico and Canada rose 4%. In contrast, exports to Asia dropped 8%, led by the decline to China. Exports to Central and South America fell 1%.

During the past decade, China sharply increased purchases from Minnesota and became, at various times, the state’s second- or third-largest purchaser. But over the past year, the U.S. and China heaped new tariffs on each other in a fight that began when President Donald Trump tried to bolster the U.S. steel industry.

Even trading with Canada, Minnesota’s largest trading partner, suffered in the process. Its purchases of the state’s goods were down 3% to $1.02 billion in the first quarter.

Trade with Mexico, now the state’s second-largest trading partner, increased 16% to $621 million worth of Minnesota-made goods.

China was next with $606 million in purchases, down from $698 million in the first three months of 2018.

France and Germany grew 21% and 26% respectively to $129 million and $310 million.

In the wake of the trade war, state manufacturers have sought replacement suppliers for components and new customers for finished goods.

In recent weeks, Polaris Industries, Banner Engineering, nVent Electric, C.H. Robinson and Minnesota Twist Drill have all discussed efforts taken to curtail the damage.

“Even within an uncertain and challenging trade environment, Minnesota businesses continue to pursue their export strategies, expanding their reach into world markets,” Steve Grove, commissioner of the Minnesota Department of Employment and Economic Development, said in a statement.

Exports to Japan rose 3% to $353 million. To South Korea, they fell 1% to $247 million and to Singapore, they fell 29% to $141 million.

In Europe, exports to the United Kingdom rose 3% to $161 million, while to Belgium they fell 4% to $142 million.

Minnesota’s medical and optical products remained most in demand worldwide. They rose 6% to $1.1 billion in the quarter.

Shipments of food by-products; stone, plaster and cement; and iron/steel products grew slightly. Exports of aircraft and spacecraft products, plastics and vehicles fell.