Washington (CNN) President Donald Trump's demand that new tariffs be slapped on steel and aluminum imports has spooked markets, prompted his chief economist's resignation, rattled major US allies and widened a rift with establishment Republicans.

None of that stopped Trump from moving forward with his plan Thursday to erect 25% and 10% tariffs on steel and aluminum imports respectively, as he signed two tariff proclamations at the White House on Thursday, surrounded by steel and aluminum workers.

"A strong steel and aluminum industry are vital to our national security -- absolutely vital. Steel is steel, you don't have steel you don't have a country," Trump said Thursday, adding that foreign imports and dumping have led to "shuttered plants and mills" and the laying off of "millions of workers," overstating the job losses in those industries, which his own adviser put at under 100,000.

"This is not merely an economic disaster, but it's a security disaster we want to build our ships, we want to build our planes ... with steel and aluminum from our country," Trump said. "We're finally taking action to correct this long overdue problem. Today I'm defending America's national security by placing tariffs on foreign imports of steel and aluminum."

But in a shift from recent plans, Trump will exempt Canada and Mexico from the tariffs and allow other US allies to petition for similar exemptions.

The NAFTA trading partners will be exempted while the three countries continue to renegotiate that free trade agreement and a senior administration official also cited the "security relationship" between the three countries as a rationale for their exemption.

Those exclusions are expected to quell some of the uproar, but could still set off a trade war between the US and several countries -- a battle Trump insists the US can win even as some of his closest advisers worry the tariffs could hurt the growing American economy. But the prospect of additional country exclusions could also lead Trump to increase the tariff rate on other countries, a senior administration official warned.

Trump is imposing the tariffs using a rarely employed trade provision known as Section 232 of the Trade Expansion Act of 1962, claiming a national security rationale for protecting the domestic steel and aluminum industries. Anticipating attacks on that legal basis, a senior administration official insisted the rationale was "unassailable" and stressed that national security includes both national defense and economic security.

But the President also framed his decision along political lines on Thursday, just days before he heads to Pittsburgh -- the heart of steel country -- for a rally aimed at boosting a struggling Republican congressional campaign.

"I'm delivering on a promise I made during the campaign and a promise I've been making for a good part of my life," Trump said as he prepared to sign the tariff proclamations.

It's not clear what political effect the order would have in the Pennsylvania race. The Democratic candidate in the race supports Trump's tariff proposal.

The move is expected to be questioned and countered, and could further put the US at odds with the international community.

Coming on the same day that 11 US allies -- but not the US -- sign a landmark Asia-Pacific trade agreement, the move on tariffs only underscores Trump's embrace of the protectionist policies he believes helped him win the presidency.

In the US, Trump faced a stiff rebuke from trade groups representing retailers and manufacturers who are top consumers of steel and aluminum. He also faced continued criticism from within his own party, most notably House Speaker Paul Ryan who continued to lament Trump's move -- even as he applauded the exemptions for Canada and Mexico.

"I am pleased that the President has listened to those who share my concerns and included an exemption for some American allies, but it should go further. We will continue to urge the administration to narrow this policy so that it is focused only on those countries and practices that violate trade law," Ryan said. "Our economy and our national security are strengthened by fostering free trade with our allies and promoting the rule of law."

The country exclusions marked a shift in the administration's thinking in recent days, after the President's trade adviser Peter Navarro said Sunday he did not expect any countries to be exempted from the tariffs.

Pressed about the change, a senior administration official rejected the change as a "softening" and instead touted the flexibility built into the tariff proclamations Trump is issuing.

Looking forward to 3:30 P.M. meeting today at the White House. We have to protect & build our Steel and Aluminum Industries while at the same time showing great flexibility and cooperation toward those that are real friends and treat us fairly on both trade and the military. — Donald J. Trump (@realDonaldTrump) March 8, 2018

The tariff signing came after days of confusion over how the President would move forward. On Thursday morning, the situation was still shrouded in uncertainty. Multiple officials awoke with no clear picture of what Trump was prepared to sign during the afternoon event. Advisers have been scrambling since last week to finalize details on the tariffs after Trump announced he would impose them during a meeting with industry executives.

Multiple senior administration officials familiar with the planning said Trump was prepared to sign something on Thursday afternoon -- though actual details of the document were still coming together through the morning. Advisers were prepared with a largely symbolic memo declaring Trump's intent to take action on steel tariffs in case a more substantive order wasn't final.

But by midday it appeared that formal language imposing new tariffs was ready to sign. Trump told reporters in the Cabinet Room that certain countries would be excluded, including Canada and Mexico, and kept open the possibility of excluding other nations like Australia, which are important national security allies.

"I'll have a right to go up or down, depending on the country, and I'll have a right to drop out countries or add countries," Trump said.

The confusion on Thursday in the hours leading up to the signing was an exclamation point to cap off a week of disarray within the White House sparked by a President eager to swiftly move forward with the tariffs -- even as the policy was still being written.

Further disarray

JUST WATCHED Toobin: Cohn stomached racism, not tariffs Replay More Videos ... MUST WATCH Toobin: Cohn stomached racism, not tariffs 01:00

The scramble over the tariffs has propelled the White House into further disarray over the past week. Trump's surprise announcement has already spooked markets, caused a rift with his closest allies on Capitol Hill, and prompted the resignation of his top economist Gary Cohn.

"He may be a globalist, but I still like him," Trump said Thursday of Cohn, who was sitting in the room and announced earlier this week he is resigning as director of the National Economic Council. "He is seriously a globalist, there is no question. But in his own way he's a nationalist because he loves our country."

On Wednesday and Thursday, aides described rapid-pace scheduling changes as Trump applied pressure on his staff to finish writing the tariff order.

Initially, aides had planned for a noon event on Thursday before moving the time to 3:30 p.m. ET. Facing persistent questions over the legality of the move, the event was pulled from the schedule, but on Thursday morning it was back on the schedule and Trump was previewing it himself on Twitter.

JUST WATCHED Ryan urges Trump to be 'surgical' on tariffs Replay More Videos ... MUST WATCH Ryan urges Trump to be 'surgical' on tariffs 00:38

The effort among US allies and Republican lawmakers on Capitol Hill to stop Trump from moving forward with his tariff proposal continued into Thursday -- further underscoring the uncertainty about how Trump would act.

Top Republican lawmakers and the leaders from major US trading partners have resisted the tariffs plan and in recent days were flooded with phone calls from foreign allies trying to stop Trump's tariff plan.

Canadian Prime Minister Justin Trudeau spoke on Thursday with the top two congressional Republicans -- House Speaker Paul Ryan and Senate Majority Leader Mitch McConnell -- to discuss the matter, Trudeau's office said.

More the 100 GOP members of Congress wrote Trump on Wednesday urging him to "reconsider the idea of broad tariffs to avoid unintended negative consequences."

Despite the exemptions, the tariffs could lead to retaliation from certain countries. The European Union on Wednesday detailed a list of US-made goods that it would subject to reciprocal tariffs if Trump follows through with his plan. China also indicated it was preparing an appropriate response.

Trump was unmoved by those threats, instead declaring trade wars "easy to win" as he moved forward to implement a key campaign promise.