WASHINGTON — President Trump intensified his attack Friday on an anonymous Op-Ed essay published in The New York Times, declaring that he wanted Attorney General Jeff Sessions to investigate the source of the article, which he has condemned as an act of treason.

Mr. Trump said he was also considering action against The Times, though he did not elaborate. Prosecutors said it would be inappropriate for the Justice Department to conduct such an investigation, since it was likely that no laws were broken, while The Times said it would be an abuse of power.

Speaking to reporters on Air Force One as he traveled to Fargo, N.D., Mr. Trump said, “I would say Jeff should be investigating who the author of that piece was because I really believe it’s national security.”

The president has raged against the essay since The Times published it on Wednesday afternoon, setting off a frenzy of speculation in the capital about the identity of the author and prompting a parade of denials from cabinet members and other prominent officials in the Trump administration.