WASHINGTON — In a remarkably public confrontation, House Speaker Paul Ryan and other Republican allies of President Donald Trump pleaded with him Monday to back away from his threatened international tariffs, which they fear could spark a dangerous trade war. Trump retorted: “We’re not backing down.”

The president said U.S. neighbors Canada and Mexico would not be spared from his plans for special import taxes on steel and aluminum, but he held out the possibility of later exempting the longstanding friends if they agree to better terms for the U.S. in talks aimed at revising the North American Free Trade Agreement.

“We’ve had a very bad deal with Mexico; we’ve had a very bad deal with Canada. It’s called NAFTA,” he declared.

Trump spoke shortly after a spokeswoman for Ryan, a Trump ally, said the GOP leader was “extremely worried” that the proposed tariffs would set off a trade war and urged the White House “to not advance with this plan.”

Likewise, Republican leaders of the House Ways and Means Committee circulated a letter opposing Trump’s plan, and GOP congressional leaders suggested they may attempt to prevent the tariffs if the president moves forward.

Trump’s pledge to implement tariffs of 25 percent on steel imports and 10 percent on aluminum imports has roiled financial markets, angered foreign allies and created unusual alliances for a president who blasted unfavorable trade deals during his 2016 campaign. Union leaders and Democratic lawmakers from Rust Belt states have praised the planned tariffs, joining with advocates within the administration including Commerce Secretary Wilbur Ross and White House trade adviser Peter Navarro.

But the president has been opposed internally by Defense Secretary James Mattis and White House economic adviser Gary Cohn, who warned against penalizing U.S. allies and undercutting the economic benefits of the president’s sweeping tax overhaul.

Likewise, the statement from Ryan’s office said, “The new tax reform law has boosted the economy, and we certainly don’t want to jeopardize those gains.”

Asked about that public rebuke, White House press secretary Sarah Huckabee Sanders said, “Look, we have a great relationship with Speaker Ryan. We’re going to continue to have one, but that doesn’t mean we have to agree on everything.”

Canada is the United States’ No. 1 foreign supplier of both steel and aluminum. Mexico is the No. 4 supplier of steel and No. 7 for aluminum.

Congressional Republicans say any tariffs should be narrow in scope, and they privately warned that Trump’s effort could hurt the party’s hopes to preserve its majority in the fall elections.

As the president dug in on his position, any potential compromise with foreign trading partners and Republican lawmakers was expected to still include some form of tariffs.

“Trump is not someone who retreats,” said Stephen Moore, an economist with the conservative Heritage Foundation and a former campaign adviser. “He’s going to need to be able to declare some victory here.”

The tariffs will be made official in the next two weeks, White House officials said.

“Twenty-five percent on steel, and the 10 percent on aluminum, no country exclusions — firm line in the sand,” said Navarro, speaking on “Fox and Friends.”

Republican critics on Capitol Hill and within the administration argue that industries and their workers that rely on steel and aluminum for their products will suffer. The cost of new appliances, cars and buildings will rise for Americans if the president follows through, they warn, and other nations could retaliate.

Two dozen conservative groups, including the Club for Growth, FreedomWorks and the National Taxpayers Union, urged Trump to reconsider, writing in a letter that the tariffs would be “a tax on the middle class with everything from cars to baseball bats to even beer.”

The Trade Partnership, a consulting firm, said the tariffs would increase U.S. employment in the steel and aluminum sector by about 33,000 jobs but would cost 179,000 jobs in the rest of the economy.

The end result could erode the president’s base of support with rural America and even the blue-collar workers the president says he’s trying to help.

“These are people that voted for him and supported him in these auto-producing states,” said Cody Lusk, president of the American International Automobile Dealers Association. Lusk noted that of the 16 states with auto plants, Trump won all but two.

The administration has argued the tariffs are necessary to preserve the American aluminum and steel industries and protect national security. But Trump’s comments and tweets early Monday suggested he was also using them as leverage in the current talks to revise NAFTA. The latest round of a nearly yearlong renegotiation effort is concluding this week in Mexico City.

At those talks, U.S Trade Representative Robert Lighthizer said Monday that progress has been less than many had hoped and “our time is running short.”

“I fear the longer we proceed, the more political headwinds we will feel,” he said. And he added that if three-way negotiations don’t work, “we are prepared to move on a bilateral basis.”

More upbeat about progress until now, Dan Ujczo, a trade attorney with Dickinson Wright PLLC in Columbus, Ohio, said, “We were moving toward the finish line in NAFTA.” But he added, “This has the potential to throw the NAFTA talks off track.”

He said neither Canada nor Mexico will want to be seen as giving in to U.S. pressure. Indeed, he said, Canada is probably already drawing up lists of U.S. products to tax in retaliation.

Separately, Mexican Economy Secretary Ildefonso Guajardo tweeted: “Mexico shouldn’t be included in steel & aluminum tariffs. It’s the wrong way to incentivize the creation of a new & modern #NAFTA.”

The president opened the door to exempting Canada and Mexico from the tariffs, saying, “That would be, I would imagine, one of the points that we’ll negotiate.” But he added, “If they aren’t going to make a fair NAFTA deal, we’re just going to leave it this way.”

Trump has long threatened to pull out of the 24-year-old trade pact if it can’t be overhauled and encourage manufacturers to bring factory jobs back the United States.

But Canadian Prime Minister Justin Trudeau has called the tariff plan “absolutely unacceptable.”

And overseas, Jean-Claude Juncker, president of the European Commission, said the European Union could respond by taxing American goods including bourbon, blue jeans and Harley Davidson motorcycles.

Trump threatened to tax European cars if the EU boosts tariffs on American products in response to his plan.

“If they want to do something, we’ll just tax their cars that they send in here like water,” Trump has said, lamenting European “trade barriers that are worse than tariffs.”

For congressional leaders, those products hit close to home. The iconic motorcycles are produced in Ryan’s home state of Wisconsin, and Kentucky, the home of Senate Majority Leader Mitch McConnell, is well-known for its bourbon.