Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — The White House said Wednesday that President Donald Trump would press ahead with controversial tariffs on steel and aluminum by the end of this week, but confirmed that some countries — including Mexico and Canada — could get carve-outs exempting them from the trade penalties.

That decision is based on "national security," White House Press Secretary Sarah Huckabee Sanders said, adding that it's possible other countries could receive the exemptions as well. Those choices would be made on "a case-by-case, country-by-country" basis, she said.

White House Press Secretary Sarah Huckabee Sanders holds a news conference at the White House in Washington on March 7, 2018. Mandel Ngan / AFP - Getty Images

Trump's commitment to enacting these tariffs have roiled both lawmakers in Trump's own party and top White House staffers. The tariff turmoil sparked the resignation of Trump's top economic adviser, Gary Cohn, who was vehemently opposed to the decision.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Commerce Secretary Wilbur Ross, an advocate for tariffs, told reporters Wednesday morning that the administration was "trying to do a surgical approach" on the issue.

"If we can work something out with Canada and Mexico, they will be exempted," he said. "It's not inconceivable that others could be exempted on a similar basis."

This week, it appeared that the president might be planning to use the tariffs as leverage to renegotiate NAFTA — a high-stakes approach that has numerous U.S. industry officials and members of Congress warning would prompt a trade war, regardless of the outcome.

We have large trade deficits with Mexico and Canada. NAFTA, which is under renegotiation right now, has been a bad deal for U.S.A. Massive relocation of companies & jobs. Tariffs on Steel and Aluminum will only come off if new & fair NAFTA agreement is signed. Also, Canada must.. — Donald J. Trump (@realDonaldTrump) March 5, 2018

The tariffs, Trump tweeted Monday, would only come off "if new & fair NAFTA agreement is signed."

Treasury Secretary Steven Mnuchin echoed the president's statement Tuesday.

"In the case of Canada and Mexico, our objective is to have a new NAFTA, and once we do that, which I’m cautiously optimistic on, the tariffs won’t apply to them," Mnuchin told a House Appropriations subcommittee. "To the extent that we’re successful in renegotiating NAFTA, those tariffs won’t apply to Mexico and Canada."

Talks to renegotiate the terms of the trade deal, which has long been a priority for Trump, have been moving slower than anticipated.