Donald Trump had a combative political relationship with John McCain, who died last August (File Photo)

The acting Pentagon chief confirmed Sunday that the White House had requested the hiding of a warship bearing the name of late Senator John McCain during a visit by Donald Trump to Japan.

In Washington, White House chief of staff Mick Mulvaney said the request probably was made by somebody on the president's advance team but no one would be fired for it.

US media reported that efforts were made to obscure the USS John S. McCain's name during Trump's visit to an American military facility last week, accusations denied by acting Defense Secretary Patrick Shanahan and the president.

But Shanahan said Sunday that the president's staff had contacted the Japan-based 7th Fleet of the US Navy and given "the directive that the USS John S McCain should be hidden from view".

"That directive was not carried out," Shanahan told media while flying to Seoul for the third leg of his week-long tour of Asia.

Shanahan said he commissioned an investigation led by the Pentagon chief of staff upon learning of the incident.

"There is no room for politicising the military," he added. "I'll deal with this in an appropriate manner."

Shanahan's spokesman, Lieutenant-Colonel Joe Buccino, said the Pentagon had already lodged a protest at a White House meeting on Friday.

"Secretary Shanahan directed his chief of staff to speak with the White House military office and reaffirm its mandate that the (Pentagon) will not be politicised," Buccino said.

Mulvaney, in comments on NBC's "Meet the Press," acknowledged the request was probably made by someone on the White House advance team but said it was "not an unreasonable thing to ask."

"Is someone going to get fired for this? No," he said.

McCain Feud

Trump had a combative political relationship with McCain, who died last August and was taken prisoner and tortured during the Vietnam war.

According to the Wall Street Journal, which first reported the story, Shanahan was aware of concern about the ship's name and "approved measures to ensure it didn't interfere with the president's visit."

Those measures included hanging a tarpaulin over the ship's name, the Journal said. The tarpaulin was removed before Trump arrived, but a barge was moved closer to the ship, blocking the view of its name.

Crew serving aboard the 154-metre (505-foot) vessel, whose uniforms bear the ship's name, were prevented from attending a speech Trump delivered from a neighbouring ship, media reports said.

Shanahan denied any involvement when asked by reporters on Thursday.

Trump insisted the same day that he would not have ordered hiding the vessel from view during his visit, and said he "couldn't care less" whether a Navy destroyer bore the name of his late rival.