U.S. President Donald Trump talks to reporters prior to boarding Air Force One as he departs Washington for campaign travel to California from Joint Base Andrews in Maryland, U.S., February 18, 2020. REUTERS/Kevin Lamarque

WASHINGTON (Reuters) - U.S. President Donald Trump said on Tuesday that he knew the identity of an anonymous Trump administration official who wrote an essay for the New York Times and later a book about efforts from within to thwart parts of the president’s agenda to protect the country from his worst impulses.

Asked about the author, who is usually referred to in Washington as “Anonymous,” Trump told reporters outside Air Force One: “I know who it is. I can’t tell you that, but I know who it is.”

The identity of Anonymous has been publicly unknown since September 2018, when the initial opinion story was published in the New York Times, and through 2019, when the official published a book called “A Warning.”

Trump, who has repeatedly railed against the American press, called for a Justice Department investigation into the New York Times and said he was considering taking action against the newspaper after the opinion piece was published.

Several prominent Trump officials, including U.S. Secretary of State Mike Pompeo and Jim Mattis, who was secretary of defense at the time, have denied being Anonymous.

The anonymous author wrote that a bid to remove Trump from the presidency was dismissed to avoid a constitutional crisis and argued that Trump was amoral, warning that electing him to a second term would be “courting disaster.”

Though the book was a bestseller for weeks, critics called it opportunistic and gutless.