Japan’s exports grew for a third consecutive month on the back of robust shipments of vehicles, offering support for the economy as domestic demand remains patchy.

Exports rose 7.8% in February from a year earlier, the finance ministry reported Thursday. That compared with a 5.1% gain estimated by economists. Imports advanced by 0.5%, matching the consensus forecast. The trade deficit narrowed to ¥379.4 billion ($2.5 billion). Seasonally adjusted exports fell 1.5% compared with January.

Shipments of vehicles rose by 20%, while those for autoparts rose about 23%, underpinning the year-on-year result. Those gains came even as Japan’s auto output took a hit after Daihatsu Motor, a subsidiary of Toyota, had to suspend domestic production and deliveries of multiple models from December over a vehicle certification scandal. Some of that output was restored last month, while other factory lines only came back on line this month.