TOKYO — For Japan, the hits just keep on coming.

Only last week, Tokyo was scrambling to recover after being caught flat-footed by President Trump’s abrupt acceptance of an invitation to meet Kim Jong-un personally to discuss North Korea’s nuclear program.

On Friday, officials in Japan awoke to the news that it was the largest American ally to be left off a list of countries temporarily exempted from stiff tariffs on steel and aluminum imports by the Trump administration.

The omission of Japan, the largest foreign supplier to be so excluded, was especially pointed. Australia, Brazil, Mexico and even South Korea, which is engaged with the United States in tense renegotiations of a free-trade pact, appeared on the list.

The move also seemed a personal snub of Prime Minister Shinzo Abe, who has courted Mr. Trump through rounds of golf, frequent telephone calls and lavish steak meals.