The Pentagon has told the White House to stop politicizing the military, amid a furor over a Trump administration order to have the Navy ship named for the late Sen. John McCain hidden from view during a presidential visit.

A defense official said Acting Defense Secretary Patrick Shanahan is also considering sending out formal guidance to military units in order to avoid similar problems in the future.

Shanahan, who was traveling to South Korea on Sunday, confirmed details about a Navy email that said the White House military office wanted the USS John McCain kept "out of sight" when President Donald Trump visited Japan about a week ago. The internal Navy email came to light last week, triggering a storm of outrage.