Legislators voted 207-81 to formally back the deal, which is designed to encourage a move away from fossil fuels. Trudeau’s Liberals hold a majority of seats in the House of Commons and the result was never in doubt.

The Liberals took over last November from the right-wing Conservatives, who during their time in power withdrew Canada from the earlier Kyoto climate change accord on the grounds it would harm the economy, and opposed any form of carbon pricing.

“This is a really great day ... after 10 years of inaction, of not taking serious steps to tackle climate change, we’re finally doing it,” Environment Minister Catherine McKenna told reporters before the vote.

The United Nations said earlier on Wednesday that the global agreement on climate change had passed the threshold for ratification and that the deal would start formally in 30 days.

In Washington, U.S. President Barack Obama hailed it as a “historic day” for protecting the planet. The United States and China ratified the agreement last month in a joint step by the world’s top emitters.

The deal will take force on Nov. 4, four days before the U.S. presidential election in which Republican Donald Trump opposes the accord and Democrat Hillary Clinton strongly supports it.

In the first move of its kind in Canada, Trudeau vowed on Monday to bring in a minimum nationwide price on carbon emissions by 2018.

Data show Canada has little chance of meeting its climate change goals, in part because of booming emissions from the energy sector.