The White House wanted the U.S. Navy to keep a warship named for the late Sen. John McCain out of President Donald Trump's view during his trip to Japan, three U.S. officials said Wednesday.

As first reported by The Wall Street Journal, a U.S. Indo-Pacific Command official wrote an email to Navy and Air Force officials about Trump's arrival in Japan over Memorial Day weekend. It included instructions for the proper landing areas for helicopters and preparations for the USS Wasp, the ship on which the president was to speak.

The official then issued a third instruction: "USS John McCain needs to be out of sight," according to the email, which was obtained by the Journal and whose existence was confirmed to The Associated Press.

The three U.S. officials spoke to the AP on condition of anonymity because they were not authorized to discuss private email correspondence.

When a Navy commander expressed surprise at the instruction, the U.S. Indo-Pacific Command official answered, "First I heard of it as well," the Journal reported. The official said he would talk to the White House Military Office to get more information about the directive, the newspaper reported.

In response to the story, Trump — who feuded with McCain publicly for years and at one point mocked his military service — tweeted that he "was not informed about anything having to do with the Navy Ship USS John S. McCain during my recent visit to Japan."

The president notably does not say that he was not informed about the ship before his visit to Japan. A message seeking clarification was left late Wednesday for White House press secretary Sarah Sanders.

In Jakarta, Indonesia, on Thursday morning, Acting Defense Secretary Patrick Shanahan told reporters, "When I read that this morning was the first I'd heard about it."

Asked if he would do an investigation, he said, "I need to find out a little bit more - just had the first glimpse of it this morning."

The Wall Street Journal reported that a tarp was placed over the USS John S. McCain's name before Trump's arrival, according to photos it reviewed, and that sailors were instructed to remove any coverings from the ship that included its name.

U.S. Navy Cdr. Clay Doss, spokesman for U.S. 7th Fleet, told the AP that the tarp was on the ship on Friday but was removed by Saturday morning, the day Trump arrived. "All ships remained in normal configuration during the President's visit," he said.

Two U.S. officials told the AP that all the ships in the harbor were lined up for Trump's visit, and they were visible from the USS Wasp. The officials said, however, that most of their names probably could not be seen since they were side by side but that the name of the USS John S. McCain could be seen from the pier.

Asked if the tarp was meant to block Trump's view of the ship, the officials said the tarp had been placed on the ship for maintenance and removed for the visit.

Rear Adm. Charlie Brown, Navy public affairs officer, tweeted Wednesday night: "The name of USS John S. McCain was not obscured during the POTUS visit to Yokosuka on Memorial Day. The Navy is proud of that ship, its crew, its namesake and its heritage."

Two U.S. officials said a paint barge was in front of the USS John S. McCain on Saturday morning when 7th Fleet officials walked the pier to see how everything looked for the visit. The barge was then ordered to be moved and was gone by the time Trump arrived, the officials said.

The Journal reported, based on people familiar with the matter, that sailors on the USS John S. McCain, who usually wear hats with the ship's name on it, were given the day off when Trump visited.

Two U.S. officials told the AP that sailors on the USS John S. McCain were not told to stay away but that many were away for the long weekend. The officials also said that about 800 sailors from more than 20 ships and Navy commands were on the USS Wasp during the president's visit, and all wore the same Navy hat that has no logo, rather than wearing individual ship or command hats.

Trump and McCain had a frosty relationship and that continued, on Trump's part, even after McCain died in August 2018 of brain cancer.

In 2015, McCain, a Republican senator from Arizona, had gotten under then-candidate Trump's skin by saying he had "fired up the crazies" at a rally in Phoenix. Trump, also a Republican, later told a crowd in Iowa that McCain was only a war hero "because he was captured. I like people who weren't captured."

After Trump took office, McCain established himself as a leading critic, opposing Trump's immigration-limiting order, warning him against coziness with Moscow and lecturing him on the illegality of torture. The senator incensed the president with his thumbs-down vote that foiled the president's efforts to repeal President Barack Obama's health care law.

Trump was not welcome at McCain's funeral and raised the White House's U.S. flag back to full-staff shortly after McCain's death, despite U.S. Flag Code stating that it should remain at half-staff for another day. The flag returned to half-staff later in the day.

McCain's daughter, Meghan, tweeted Wednesday that Trump will "always be deeply threatened by the greatness of my dads incredible life."

She added, "There is a lot of criticism of how much I speak about my dad, but nine months since he passed, Trump won't let him RIP. So I have to stand up for him.

"It makes my grief unbearable."