Canada just recorded its biggest influx of immigrants in more than a century.

The country added 71,131 immigrants in the final three months of 2018, for a full year increase of 321,065, according to the latest estimates released Thursday by Statistics Canada in Ottawa. The annual increase is the largest since 1913 — when 401,000 immigrants flocked to the country — and the fourth largest in historical data going back to 1852.

The inflows helped the nation’s population growth top half a million people for the first time since the late 1950s, the statistics agency said, and are part of a boom in international migration that includes a surge in non-permanent residents like foreign students. It’s been a welcome tailwind for an economy coping with aging demographics and other drags like record household debt.