The House of Commons approved the bill Thursday, and it was debated and approved by the Senate late Friday.
The Maritime Employers Association issued a statement saying activities at the port would gradually ramp up.
The port authority says resuming operations and reestablishing the normal flow of goods will take several days and clients waiting to import or export goods should expect delays.
Michel Murray of the Canadian Union of Public Employees has called the federal back-to-work legislation an attack on the workers’ constitutional right to strike.
He told reporters at a May Day protest in Montreal the union would take legal action and file complaints with the International Labour Organization.
The new legislation stipulates that a mediator-arbitrator will be selected in the coming days and the most recent collective agreement will be extended until a new deal is established.
The 1,150 workers at the port have been without a contract since December 2018.