SEOUL (Reuters) - The Pentagon has told the White House that the U.S. military will not be politicized, a U.S. official said on Sunday, in response to a controversy after officials directed the United States Navy to keep the USS John S. McCain out of sight during a recent speech by President Donald Trump in Japan.

FILE PHOTO: The U.S. Navy guided-missile destroyer USS John S. McCain is seen, in Singapore waters August 21, 2017. REUTERS/Ahmad Masood/File Photo

The White House military office directed the U.S. Navy’s Seventh Fleet to minimize the visibility of the USS John S. McCain, a warship bearing the name of Trump’s former political rival, during the president’s speech last week.

While the directive was not implemented after senior Navy officials found out about the request, the incident has raised questions about the politicization of the military, which has traditionally been seen as being apolitical.

“Secretary (Patrick) Shanahan directed his chief of staff to speak with the White House military office and reaffirm his mandate that the Department of Defense will not be politicized,” Lieutenant Colonel Joe Buccino, a Pentagon spokesman, said in a statement.

“The chief of staff reported that he did reinforce this message,” Buccino said.

Concern has increased about the politicization of the U.S. military under Trump. He has given a number of overtly political speeches to military audiences and the military has been drawn into a mission along the border with Mexico, which some critics have described as a political stunt rather than a national security necessity.

The USS John S. McCain controversy led acting U.S. Defense Secretary Patrick Shanahan to ask his chief of staff to find out what happened. On Sunday he told reporters that after reviewing the facts, he did not plan to call for an inspector general investigation into the incident.

“There is no room for politicizing the military,” Shanahan told reporters traveling with him to Seoul.

Acting White House Chief of Staff Mick Mulvaney on Sunday downplayed the incident, saying that a young White House staffer - knowing how Trump felt about McCain - likely made the request to the Navy.

“That’s not an unreasonable thing to ask,” Mulvaney said on NBC News’ Meet the Press program. He said it would be “silly” to fire that staffer over the incident.

Shanahan said he had spoken with late Senator McCain’s wife in the past few days about the incident but declined to give details of the conversation.

He said that his chief of staff did not have prior knowledge of the White House directive and reiterated that a search had not found any emails to his staff about it. Trump said on Wednesday he had not been aware of the request.

The USS John S. McCain was initially named after the late Senator McCain’s father and grandfather, who were both Navy admirals. In 2018, the Navy added Senator McCain to the official namesake of the guided missile destroyer.

McCain, the unsuccessful 2008 Republican presidential nominee, was shot down during the Vietnam War and tortured by his North Vietnamese captors during more than five years in captivity as a prisoner of war.

Trump has long criticized McCain on a variety of fronts, and has kept up his attacks even after McCain’s death in August.