Mexico unexpectedly posted its biggest-ever trade surplus in June as its economic crisis caused imports to slump, while food exports surged.

The gap between exports and imports widened to $5.55 billion last month from a deficit of $3.52 billion in May, Mexico’s national statistics agency reported on its website on Monday. That was higher than expected by all eleven analysts in a Bloomberg survey, whose median forecast was for a surplus of $1.55 billion.

Total exports fell almost 13% compared to a year ago to $33.1 billion, while imports declined by 22% amid weak economic activity due to the impact of the coronavirus. Shipments of agricultural products rose 32% while oil exports fell 36%. Car exports advanced 534% versus the previous month as the industry restarts after lockdowns imposed earlier this year.

“We expect the ongoing recovery of US demand to generate a welcome impulse to Mexican exports while imports are expected to remain subdued given the weak domestic demand dynamics,” Alberto Ramos, chief Latin America economist for Goldman Sachs Group Inc., wrote in a research note.