Canada has retaliated against US steel and aluminum tariffs by slapping its own penalties on American exports.

The Canadian government confirmed Sunday that it has imposed tariffs on US exports worth 16.6 billion Canadian dollars ($12.5 billion).

More than 40 US steel products attract tariffs of 25%. A tax of 10% has been levied on over 80 other American items including toffee, maple syrup, coffee beans and strawberry jam.

The response from Canada is designed to be proportional, with the new taxes being based on the amount of steel and aluminum shipped last year from Canada to the United States.

US steel tariffs, which went into effect on June 1, are expected to be particularly painful for Canada. It was the largest exporter of steel to the United States by value last year, according to Wood Mackenzie.

Prime Minister Justin Trudeau said it was necessary for Canada to hold the United States to account.

"I have made it very clear to the president that it is not something we relish doing but it is something that we absolutely will do," he said in June. "[As] Canadians, we're polite, we're reasonable but we also will not be pushed around."

Related: Trump had a chance to cut Canada's dairy tariffs. He walked away

US steel and aluminum tariffs have also been levied against Mexico, China, Turkey, India and the European Union. The Trump administration has angered key allies by justifying the tariffs on national security grounds.

Some have already launched retaliatory measures and filed legal challenges with the World Trade Organization.

Last week, the European Union imposed additional tariffs of 25% on US products such as motorcycles, orange juice, bourbon, peanut butter, cigarettes and denim. Mexico has also imposed new tariffs on the United States.

Related: How a trade war could turn into a recession

Canada and Mexico have the additional challenge of responding to US tariffs while they attempt to renegotiate NAFTA, a major free trade agreement, with the United States.

-- Julia Horowitz and Nathaniel Meyersohn contributed reporting.