Open this photo in gallery:

Canada collected $3.6-billion in import tariffs during the second quarter, $2.1-billion more than it did a year ago.DARRYL DYCK/The Canadian Press

Canada collected $2.1-billion more in import duties during the second quarter than it did a year ago, new numbers released Friday show, just as Ottawa prepares to lift most of its counter-tariffs on U.S. goods in an effort to reach a trade deal.

The federal government collected $3.6-billion in import duties in the quarter, up 142 per cent from $1.4-billion the year before, according to Statistics Canada.

The tariff income accounted for 2.8 per cent of all federal revenue in the quarter, the highest level since 1994, on a seasonally adjusted basis.

Last week, Prime Minister Mark Carney said starting Sept. 1, all U.S. goods that comply with the United States-Mexico-Canada Agreement will be exempt from the 25-per-cent retaliatory duty, a move he said would “match” a U.S. exemption from the so-called “fentanyl tariffs” President Donald Trump imposed on imports from Canada.

Canada will retain its counter-tariffs on imports of U.S. steel, aluminum and autos, in response to Mr. Trump’s sectoral duties on those goods, which have devastated those industries in Canada.

U.S. tariffs are hammering the Canadian economy.

A sharp drop in exports to the U.S., as well as a pullback in business investment, caused the economy to contract more than expected in the second quarter. Gross domestic product fell 1.6 per cent on an annualized basis, Statistics Canada reported Friday.

“Rising USMCA compliance and lower Canadian counter-tariffs are helping to cushion the impact of the trade war on Canada’s economy, and it looks increasingly likely that GDP may avoid another contraction in Q3,” wrote Michael Davenport, senior economist at Oxford Economics, in a note. “However, the impact of the trade war and elevated uncertainty on sentiment, capital spending, and hiring will likely continue to build.”

Separately, the Finance Department’s fiscal monitor for June, also released Friday, showed Ottawa collected $1.2-billion in tariff revenue that month, nearly triple the $419-million collected during the same month last year.

Since Ottawa imposed the first of its counter-tariffs in March, the government has collected $4.6-billion, a $2.9-billion increase from the same period last year, Finance numbers show.

During the election campaign, the Liberal Party projected the government would collect $20-billion in tariff revenue this fiscal year.

Even without Mr. Carney’s decision to walk back counter-tariffs, his government did not appear to be on track to meet that estimate. On an annualized basis, Ottawa’s tariff revenue in the second quarter amounted to $14.2-billion, according to Statscan.

There is some evidence that the retaliatory climbdown has gotten talks with the U.S. moving again.

Earlier this week, Canada-U.S. Trade Minister Dominic LeBlanc met with U.S. Commerce Secretary Howard Lutnick in Washington for the first time since Mr. Trump increased his broad-based tariffs on Canada to 35 per cent in August.

Canada is only one of two countries to impose counter-tariffs against the U.S. this year, China being the other.

Canada has imposed three rounds of 25-per-cent counter-tariffs on U.S. goods in retaliation to Mr. Trump’s trade war against Canada, though prior to the USMCA exemption, Ottawa has also brought in exemptions for certain products used in Canadian manufacturing.