Minnesota’s exports fell sharply in the second quarter as declining sales in Canada and China, the state’s two largest international markets, prompted the first such decline since the recession.

Minnesota companies posted international sales of $5.2 billion, a 5.7 percent drop from the same period a year ago, according to figures released Thursday by the Minnesota Department of Employment and Economic Development.

“To continue strengthening our economy, we need to identify market demand for Minnesota’s high-quality products and increase exports,” said Katie Clark Sieben, the department’s commissioner.

Exports to Europe, where the economy is showing signs of recovering, rose 12 percent, driven by growing sales in Germany, the Netherlands and Switzerland. But it wasn’t enough to offset the effects of a slowing Chinese economy and lower shipments of ore and fuel to Canada.

Exports to Canada fell $182 million, or 15 percent, and they fell $155 million to China, or 21 percent. Together, those two countries account for 40 percent of all exports from Minnesota.

“China’s economy is still growing, but the growth slowed somewhat in the first half of the year, affecting exports,” said Madeline Koch, a spokesman for the state economic development agency.

Sales to two other major Asian destinations, South Korea and Japan, also fell in the quarter.

The Canadian decline is more complicated. Minnesota exports of ores, slag and ash — almost all of which head to Canada — fell 91 percent compared with the second quarter a year ago. Exports of mineral fuels and oils, again almost entirely to Canada, fell 86 percent.

Both declines could reflect variations in the timing of reports, or shifts in end markets and the routes that commodities take to get to Canada.

Craig Pagel, director of the Iron Mining Association, said the figures likely don’t reflect falling demand for iron ore, which is mostly shipped domestically. “All the mines in Minnesota are producing at near capacity records,” he said.

Sales of manufactured products to Canada remained solid.

Exports of goods account for a little less than a tenth of Minnesota’s economic output, and Gov. Mark Dayton has identified exporting as a key economic development goal. Last year, he announced the MSP Export Initiative, aimed at doubling Twin Cities exports by 2017.

To reach that goal, businesses in the metro area would have to increase exports at the brisk pace of nearly 15 percent per year, and so far they have not achieved that.

Although overall growth was down in the quarter, exports among the state’s top 10 products increased a combined 3 percent, led by aircraft and spacecraft products, optics and medical goods, and beverages. One product that did well: denatured ethyl alcohol, a fuel and solvent, that is primarily sold to Canada.

Minnesota ranked 20th among U.S. states for total exports in the quarter.

One bright spot was exports to Africa, which climbed 24 percent in the quarter to $60 million. Exports to Central and South America rose 3 percent to $260 million.