President Donald Trump insisted Thursday he had nothing to do with keeping the USS John S. McCain hidden from the site of his weekend speech in Japan. He said whoever had done so was "well-meaning."

"I wasn't involved. I would not have done that. I was very angry with John McCain because he killed health care," Trump said, referring to the late senator's deciding vote that killed a Senate GOP bill to repeal the Affordable Care Act.

"I was not a big fan of John McCain in any way, shape or form," Trump continued in comments to reporters on the South Lawn of the White House. "Now, somebody did it because they thought I didn't like him, OK? And they were well-meaning. I will say, I didn't know anything about it. I would never have done that."

Trump's second denial came after The Wall Street Journal reported Wednesday that the White House wanted the Navy to move the destroyer "out of sight," citing an email between military officials. The ship is named for the late Arizona senator and his father and grandfather, who were admirals. Trump initially denied any knowledge of the effort in a tweet Wednesday night.

But an email to Navy and Air Force officials, obtained by CNBC, had a number of directives, including: "USS John McCain needs to be out of sight," and asking officials to "please confirm" that directive "will be satisfied." Two people with knowledge of the matter confirmed to CNBC the existence of that email.

TWEET

The Journal said a tarp was hung over the ship's name ahead of Trump's trip and that sailors were directed to remove coverings from the destroyer that bore the McCain name. The newspaper also said sailors assigned to the ship, who generally wear caps bearing its name, were given the day off during Trump's visit to the nearby USS Wasp.

Acting Defense Secretary Patrick Shanahan later told reporters, "I would never dishonor the memory of a great American patriot like Sen. John McCain" by asking that the ship be kept out of sight.

"I'd never disrespect the young men and women that crew that ship. I've asked my chief of staff to look into the matter ... and as soon as I find out more about this I'll let you know," he added.

McCain, an Arizona Republican who survived nearly six years as a POW in North Vietnam and lost the 2008 presidential election to Democrat Barack Obama, was an outspoken critic of Trump. During the 2015 presidential campaign Trump said McCain was "not a war hero" because he had been captured by North Vietnam. McCain died of cancer in August at age 81.

In a tweet on Wednesday, McCain's daughter Meghan lashed out at Trump, calling him "a child" who "makes my grief unbearable."

Meghan McCain tweet

—CNBC's Amanda Macias reported from Jakarta, Indonesia. CNBC's Ryan Ruggiero contributed to this report.