The nearly year-long tariff war between Canada and the U.S. is almost over.

The Canadian government released a statement Friday saying the two sides have agreed to eliminate the tariffs within two days.

"This is pure good news," said Prime Minister Justin Trudeau at a stop at the Stelco plant in Hamilton, Ont.

The deal applies to the tariffs the U.S. imposed last June by citing national security — 25 per cent on imports of steel and 10 per cent on aluminum — as well as Canada's retaliatory tariffs on steel, aluminum and as other consumer products.

Canada has long argued last summer's tariffs were illegal. As part of the deal, the Trudeau government has agreed to end its legal challenge against the U.S at the World Trade Organization on the section 232 tariffs.

The deal also includes:

A monitoring system to watch out for any potential surges in the metals markets.

A commitment to stop the importation of aluminum and steel that is unfairly subsidized or sold at 'dumped' prices.

A promise to prevent the transshipment of aluminum and steel made outside of Canada or the United States to either country.

It makes no mention of quotas, an American proposal the Canadian side fought against.

"We stayed strong because that's what workers were asking for, but also that's what Canadians were saying," said Trudeau.

Trudeau spoke to U.S. President Donald Trump earlier today, their third conversation this week. The Prime Minister's Office said the pair discussed the tariff issue.

Last June, the U.S. Department of Commerce slapped tariffs of 25 per cent on imports of steel and 10 per cent on aluminum, citing national security interests. Canada, Mexico and a number of other countries were affected. (Tara Walton/Canadian Press)

Trump was looking for a win: source

The tariffs have disrupted supply chains and added extra costs for consumers and businesses across a wide range of industries on both sides of the border, and were becoming a barrier to ratifying the new North American free trade pact.

Watch: Trudeau on U.S. lifting of steel and aluminum tariffs

Prime Minister Justin Trudeau spoke to reporters at the Stelco steel works in Hamilton Friday afternoon 1:58

A senior source with direct knowledge of the negotiations said the Canadian side had been quietly insisting that Canada wasn't going to ratify that deal until the tariffs were lifted. The source added that President Trump is looking for a trade win, given escalating tension with China.

Trudeau had been using his phone calls with Trump to point out that Canada poses no credible national security risk to the United States, said the source.

Trudeau said Friday's agreement followed a series of conversations between Foreign Affairs Minister Chrystia Freeland, Finance Minister Bill Morneau and Canadian and American negotiators.

"There was no one breakthrough moment ... Lots of conversations with the president over the past week and an understanding as well that these tariffs were harming workers and consumers on both sides of the border," he said in Hamilton.

"As we look at moving forward with the new NAFTA, it didn't make a lot of sense to continue to have tariffs on steel and aluminum between our countries. That's where we got to."

Mexico's chief North American trade negotiator, Jesus Seade — who said on Wednesday the U.S. and Mexico were close to a deal and were waiting on Canada — tweeted Friday that the deal followed bilateral talks between Mexico and the U.S.

This is the result of hard work between U.S. and Mexico to strengthen the bilateral relationship in favor of free trade and the economic integration of the region. We are delighted Canada joined and was able to make an agreement with the US. <a href="https://twitter.com/hashtag/USMCA?src=hash&ref_src=twsrc%5Etfw">#USMCA</a><a href="https://t.co/nKr3vVKt5P">https://t.co/nKr3vVKt5P</a> —@JesusSeade

However, a source with knowledge of the talks said Canada and the U.S. negotiated the list of products that would be monitored and the mechanisms to investigate dumping — key U.S. concerns that will also apply to Mexico.

The source told CBC News that Mexico had been ready to sign on to a deal earlier in the week before those specifics were hammered out.

Industry reacts

Jean Simard, spokesperson for the Aluminum Association of Canada, said the deal comes as a relief for workers in both countries.

"We think it's a great victory for Canada, for the industry and the North American industry as a whole," he said.

"It's everything we've always asked for."

Friday's announcement followed a week of intensified pressure.

Freeland was in Washington, D.C., earlier this week to sit down with her American counterpart and held a series of meetings with members of Congress.

Her trip followed on two phone conversations Prime Minister Trudeau had with Trump within the past week, during which he asked the president for an end to U.S. steel tariffs and additional diplomatic assistance with Canada's ongoing dispute with China.

Pence coming to Canada

The ratification of the revised North American trade agreement by the U.S. Congress has proved to be difficult.

In the House of Representatives, the Democratic majority wants to change several parts of the deal, including its labour provisions (following the lead of American unions saying Mexico has not yet done enough to raise its standards) and the deal's longer protection period for certain pharmaceuticals, which they argue will result in unacceptably high drug prices for Americans.

That's prompting U.S. Vice-President Mike Pence to head north at the end of the month to meet with Trudeau to discuss moving the trade deal along.

While ratification remains in doubt in Washington, there has been little incentive for Canada to rush its ratification process.

Watch: Trudeau speaking to steel workers in Hamilton before announcing deal

Prime Minister Justin Trudeau announced the deal Friday at the Stelco works in Hamilton 0:54

Trade treaties in Canada are ratified by cabinet. Usually, the date of ratification cannot be fixed until laws and regulations are changed to bring Canada into compliance with the new deal.

With only a few weeks to go before summer recess and the fall election, there's likely not enough time on the parliamentary calendar to pass implementation legislation before next fall. The drafting of that bill may also be on hold until it's certain the text of the agreement won't be changing.

The Conservative Party expressed broad support for the text Canada signed last Nov. 30. There's little reason to conclude it could not be ratified in Canada even if the government changes hands next fall, but Trudeau's current Liberal government may prefer that the deal it negotiated be ratified on his watch.

Ontario Premier Doug Ford released a statement applauding the deal and saying that his government is looking forward to getting more details.

"We are relieved (the tariffs) have finally come to an end," Ford said.

Watch: Andrew Scheer reacts to news of a possible deal on steel and aluminum tariffs