(Bloomberg) -- Canada ran a second straight monthly trade surplus for the first time in five years, an improvement that reflects slumping imports.

Canada ran a merchandise trade surplus of C$1.04 billion ($824 million) in February from a revised C$1.21 billion in January, Statistics Canada reported Wednesday in Ottawa. Economists were anticipating a C$1.3 billion surplus. Canada hasn’t had back-to-back monthly trade surpluses since 2016.

Both exports and imports were down in February. Shipments abroad fell 2.7%, but that’s after a surge in January of 8.2%. Imports were down 2.4%, more than offsetting gains a month earlier and bringing purchases from abroad to their lowest level since August.

Statistics Canada said a global shortage of semiconductor chips impacted trade in the auto sector, with exports of motor vehicles and parts dropping 10% in February and imports down 7.8%.

©2021 Bloomberg L.P.