President Trump kicked off March by stunning members of his own White House, and leaders across the world, with a vow to impose across-the-board tariffs on steel and aluminum.

Within a week of making the announcement, which could provoke a cycle of retaliation between trade partners, Mr. Trump was defending the move even as his White House worked to soften its effects.

On Tuesday, Gary D. Cohn, the president’s top economic adviser, said he would resign after appearing to lose an internal battle over the tariffs. A longtime proponent of free trade, he believed the decision could jeopardize economic growth.

And then, on Thursday, Mr. Trump signed orders imposing the stiff and sweeping new tariffs. But he also agreed to exempt, for now, Canada and Mexico, and held out the possibility of later excluding allies such as Australia.