A mystery continues to surround a reported U.S. military email that called for the USS John S. McCain to be “out of sight” during President Trump’s recent visit to U.S. troops stationed in Japan, where the ship was docked.

On Wednesday, both President Trump and acting Defense Secretary Patrick Shanahan denied any knowledge of the order, which led to the ship’s name first being covered with a tarp and then being obscured by a paint barge prior to Trump’s visit over Memorial Day weekend.

“I was not informed about anything having to do with the Navy Ship USS John S. McCain during my recent visit to Japan,” President Trump wrote on Twitter late Wednesday. “Nevertheless, @FLOTUS and I loved being with our great Military Men and Women - what a spectacular job they do!”

USS JOHN S MCCAIN LEAVES DRY DOCK MORE THAN YEAR AFTER FATAL COLLISION

A spokesman for Secretary Shanahan later issued the following statement: “Secretary Shanahan was not aware of the directive to move the USS John S McCain nor was he aware of the concern precipitating the directive.”

“Secretary Shanahan was not aware of the directive to move the USS John S McCain nor was he aware of the concern precipitating the directive.” — Statement from office of Patrick Shanahan, acting secretary of defense

That statement appeared to contradict a Wall Street Journal story, which cited an unnamed U.S. official as saying that Shanahan was “aware of the concern about the presence of the USS John McCain in Japan and approved measures to ensure it didn’t interfere with the president’s visit.”

The existence of the email – sent by an unnamed U.S. Indo-Pacific Command official to U.S. Navy and Air Force officials – was first reported by the Journal. The newspaper’s story claimed that orders referring to the USS John S. McCain originated from “the White House,” but named no specific official.

The ship is named for the father and grandfather of the late U.S. Sen. John S. McCain III, with whom President Trump had feuded prior to the Arizona Republican’s death from cancer last year at age 81.

The emergence of the Journal story apparently infuriated Meghan McCain, daughter of the late senator and a co-host of ABC’s “The View” – who, like her late father, is a frequent Trump critic.

MEGHAN MCCAIN DISMISSES 'VIEW' CONVERSATION: 'I'M NOT CHANGING YOUR MINDS THIS MORNING'

In a tweet Wednesday that preceded the president’s message, Meghan McCain appeared to insinuate that the order to obscure the ship's name had come from the president.

Meghan McCain retweeted the Journal story, adding the following comment: “Trump is a child who will always be deeply threatened by the greatness of my dads [sic] incredible life. 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."

Since McCain’s death, the late senator’s 34-year-old daughter has been quick to defend his legacy. Just two days earlier, Meghan McCain aimed her ire at Sen. Amy Klobuchar, D-Minn., a candidate for the 2020 Democratic Party presidential nomination.

Klobuchar recently claimed that the late senator “kept reciting to me names of dictators” during President Trump’s inaugural address in 2017, suggesting that the elder McCain dreaded the thought of a Trump presidency.

But Meghan McCain said she and her family would prefer if the late senator’s name not be invoked at all during the 2020 election season.

CLICK HERE TO GET THE FOX NEWS APP

"On behalf of the entire McCain family, [Amy Klobuchar], please be respectful to all of us and leave my father's legacy and memory out of presidential politics,” the late senator’s daughter wrote.

Ultimately, the Journal reported, the tarp that covered the name of the USS John S. McCain was removed Saturday and the paint barge that obscured the name was removed as well – both ahead of Trump’s visit, Cmdr. Clayton Doss, a spokesman for the Navy’s Seventh Fleet, told the newspaper.

President Trump spoke to the Japan-based U.S. troops Tuesday while aboard the USS Wasp, which was docked at the same naval base as the USS John S. McCain.