The nation's exports exceeded imports in March for the first time in almost three years, providing support for an economy struggling with weak domestic spending.

The trade surplus was ¥229.3 billion, the Finance Ministry announced Wednesday, soaring above a median estimate of ¥44.6 billion in a survey of economists by Bloomberg.

Imports of fossil fuels jumped after the 2011 Fukushima meltdowns led to the closure of all the nation's nuclear power plants. Oil's more than 40 percent price drop in the past 12 months has cut that bill, while a weaker yen has boosted the value of exports.

"External demand will be a bright spot for Japan's economy this year, as domestic consumption and capital investment are expected to remain weak," said Toru Suehiro, an economist at Mizuho in Tokyo. "Exports are on a rising trend."

The trade balance will return to deficit in April and remain negative for 2015, according to Suehiro. He said the temporary upturn owed much to a reduction in activity in Asia in February due to Lunar New Year holidays and a rebound in March.

The value of overseas shipments rose 8.5 percent from a year earlier, while imports slid 14.5 percent. Export volumes were at the highest since March 2012, up 3.3 percent from a year earlier.

The ¥3.3 billion surplus on a seasonally adjusted basis was the first since February 2011, the month before the Great East Japan Earthquake.

Cars, electronic parts and metal-working machinery were the biggest contributors to the rise in shipments.