Mexico posted a surprise trade surplus in May as exports declined at a slower rate despite a flu outbreak that forced some factories to idle, encouraging the view that the recession's darker days are past.

The country posted a $680 million trade surplus during the month, with exports sliding 33% from a year earlier, Mexico's statistics agency said.

At the factory of the Alabama Bag Co. located in Piedras Negras, just across the border with Texas, sales to the United States are still down sharply from a year ago, but the drop in sales has moderated, said Luis Chaires, who runs the company's operations in Mexico and Latin America.

"Things are looking a little better." Chaires said. He said the steepest falls in exports from the factory were in the first few months of the year.

Mexico is trudging through its deepest slowdown since the mid-1990s "Tequila Crisis" due to lower demand for its factory wares in the recession-hit United States. Economists expect the economy will contract by about 5.8% this year, according to a central bank poll published on June 1.

Exports nationwide had dropped 36% in April, and analysts had expected a $397 million trade deficit in May.

An outbreak of a flu virus paralyzed parts of the Mexican economy in May, including several auto plants.

But Mexican factory sentiment has generally improved in recent months, with readings pointing to smaller falls in future output.

At the same time, many analysts don't expect the economy will grow in annual terms until late this year at the earliest. The economic pain that started in Mexico's factory sector has fueled a jump in unemployment, hitting consumer demand.

In a sign the recession has spread to other sectors of the economy, Mexico's imports fell 36% in May from a year earlier, compared to a 39% drop in April. (Reuters)