Japan’s factory output rebounded in March from a dismal start to the year, with the quarterly figure registering the weakest performance since the height of the pandemic in a sign the economy may have contracted during the period.

Industrial production rose 3.8% in March from February, as demand picked up after two straight months of declines, trade ministry data showed Tuesday. The result exceeded the consensus forecast of a 3.3% gain.

The improvement in output comes after weakness early in the first quarter, as a New Year’s Day earthquake northwest of Tokyo and output suspensions in the auto industry weighed on activity from January. On a quarterly basis, output slumped 5.4% in the January-March period, the worst performance since the second quarter of 2020.