In what the newspaper described as a "rare move," The New York Times published an anonymous essay purportedly written by a senior White House official who claims to be working, along with others in the administration, to protect the country against President Donald Trump's worst instincts.

The stunning confession of a "resistance inside the Trump administration" drew swift rebukes from the White House, Trump's supporters on Capitol Hill and some members of previous administrations.

The president himself weighed in on the essay shortly after it was published during an event in the East Room of the White House

Trump called it a "gutless editorial," but his public anger was initially directed more toward The Times than the piece's author, whom he dismissed as someone who's probably "failing" at his job and is in the administration "for all the wrong reasons."

Trump condemned the "failing New York Times," which he said wouldn't exist if not for him because there would be nothing to write about, and called the publication of the anonymous attack a "disgrace.". He recalled how The Times "covered the election incorrectly" and called its staff "dishonest people."

Later, the president sent a one-word tweet reading, "Treason?"

He followed that with a demand that The Times, "for National Security purposes, turn him/her over to government at once."

In a third tweet, at 11:22 p.m. EST, Trump wrote, "I'm draining the Swamp, and the Swamp is trying to fight back. Don't worry, we will win!"

White House Press Secretary Sarah Sanders called the essay "another example of the liberal media's concerted effort to discredit the president," in a statement Wednesday.

She said the administration was "disappointed, but not surprised" that The Times "chose to publish this pathetic, reckless, and selfish op-ed. This is a new low for the so-called 'paper of record,' and it should issue an apology."

"The individual behind this piece has chosen to deceive, rather than support, the duly elected President of the United States," the statement said. "He is not putting country first, but putting himself and his ego ahead of the will of the American people. This coward should do the right thing and resign."

Sen. Lindsey Graham, R-S.C., said Trump "has every right to be upset" with the piece and that he would be angry if he were the subject of an anonymous attack. But Graham said that while the op-ed's author was guilty of "disloyalty" and of being "cowardly," the op-ed was not "treason."

Graham dismissed The Times as the "voice of the left" and predicted that "this is going to matter zero" to the American people.

Senate Majority Leader Mitch McConnell referred to the accomplishments of the current Congress when asked about the op-ed during an interview on Fox News. He said Trump has been "on the same wavelength" as congressional Republicans on taxes, regulations and court appointments.

"Republican governments don’t come along very often," he said, saying that the GOP only controlled the House, Senate and White House for 20 of the past 100 years. "We don’t want to squander that opportunity."

Ari Fleischer, who served as press secretary under President George W. Bush, said it was "impossible to evaluate how important it is without knowing how high up the author is."

Fleischer said there are hundreds of people who "think they're 'senior' officials."

"If this is a cabinet secretary, it's a problem," he said.

David McIntosh, president of the conservative Club For Growth and a White House staffer during the Reagan administration, called the op-ed "cowardly."

"Having served President Reagan in the White House, what you should do if you have any integrity is resign and publicly make the same statement," McIntosh tweeted.

California Democrat and fierce Trump critic Rep. Ted Lieu called the "stunning" essay "a cry for help" that supports a host of other reports which say "Trump is unfit to lead our great nation."