Japan logged its second-biggest trade deficit on record in May as exports continued to fall after the March earthquake and tsunami, government data showed Monday, darkening the outlook for the economy.

But the result, which showed that the decline in exports was slowing, fueled optimism that the nationwide supply-chain disruptions and plunge in industrial output following the March 11 disaster are starting to be addressed.

The trade balance remained in the red for the second straight month with a deficit of ¥853.7 billion, the second-biggest on record after ¥967.9 billion marked in January 2009, when exports plunged amid the global economic downturn ushered in by the collapse of U.S. investment bank Lehman Brothers Holdings Inc. in 2008.