WASHINGTON — The Trump administration began imposing stiff tariffs on imported steel and aluminum early on Friday morning. But it granted a brief exemption to some allies, and in a twist, said it might impose import quotas to prevent too much foreign metal from flooding into the United States.

The White House detailed the decision in a pair of presidential proclamations late Thursday night. They gave allies that won exemptions a May 1 deadline to negotiate “satisfactory alternative means” to address what the administration calls the threat to United States national security resulting from its current levels of steel and aluminum imports. The exempted group includes Canada, Mexico, the European Union, Australia, Argentina, Brazil and South Korea.

President Trump also said in the proclamation that he would “consider” directing Customs and Border Protection to put in place a quota on imports from the exempted countries before the May 1 deadline, “if necessary and appropriate.” Mr. Trump wrote that he would “take into account all steel articles imports since Jan. 1, 2018, in setting the amount of such quota.”

The announcement also left the door open for other allies that did not win exemptions, most notably Japan, to negotiate with the administration over tariffs. “Any country not listed in this proclamation with which we have a security relationship remains welcome to discuss with the United States alternative ways to address the threatened impairment of the national security caused by imports of steel articles from that country,” Mr. Trump wrote.