An op-ed in the New York Times claims members of the Trump administration are working to undermine his ‘worst’ policies.

US President Donald Trump has slammed an opinion piece in The New York Times in a series of tweets, and demanded the publication to reveal the author’s identity for national security purposes.

The op-ed was written by an anonymous senior administration official who claimed to be part of a “resistance” working “from within” to thwart Trump’s “worst inclinations”.

The president tweeted out the word “TREASON?” followed by: “I’m draining the Swamp, and the Swamp is trying to fight back. Don’t worry, we will win!”

Does the so-called “Senior Administration Official” really exist, or is it just the Failing New York Times with another phony source? If the GUTLESS anonymous person does indeed exist, the Times must, for National Security purposes, turn him/her over to government at once! — Donald J. Trump (@realDonaldTrump) September 5, 2018

He also appeared at an unrelated event on Wednesday at the White House, and lashed out at the Times for publishing the op-ed.

“They don’t like Donald Trump and I don’t like them,” he said of the newspaper.

Trump has been frustrated by the incessant leaking of information to the press within his own administration by anonymous White House aides.

White House press secretary Sarah Huckabee Sanders called on the “coward” who wrote the piece to “do the right thing and resign”.

In a statement, Sanders called the op-ed “pathetic, reckless, and selfish” and called on the Times to “issue an apology” for publishing the piece.

“This is just another example of the liberal media’s concerted effort to discredit the president,” she said.

‘Work of a steady state’

The writer of the Times op-ed said Trump aides are aware of the president’s faults and “many of the senior officials in his own administration are working diligently from within to frustrate parts of his agenda and his worst inclinations. I would know. I am one of them.”

“Many Trump appointees have vowed to do what we can to preserve our democratic institutions while thwarting Mr Trump’s more misguided impulses until he is out of office,” the author wrote.

“It may be cold comfort in this chaotic era, but Americans should know that there are adults in the room. We fully recognise what is happening. And we are trying to do what’s right even when Donald Trump won’t.”

Here's what's gonna happen. Sooner or later we are gonna find out who the anonymous NYT op-ed writer is. He/she will hailed as a hero. Will get a book deal. Cable TV gigs. Harvard fellowships. The predictable rewards for having your Trump cake and eating it too. — Karen Attiah (@KarenAttiah) September 5, 2018

The assertions in the column were largely in line with complaints about Trump’s behaviour that have repeatedly been raised by various administration officials, often speaking on condition of anonymity.

They were published a day after the release of details from an explosive new book by longtime journalist Bob Woodward that laid bare concerns among the highest echelon of Trump aides about the president’s judgment.

The writer also alleged “there were early whispers within the cabinet of invoking the 25th Amendment” because of the “instability” witnessed in the president. The 25th Amendment allows the vice president to take over if the commander in chief is “unable to discharge the powers and duties of his office.” It requires that the vice president and a majority of the Cabinet back relieving the president.

The writer added: “This isn’t the work of the so-called deep state. It’s the work of the steady state.”

The anonymous author wrote in the Times that where Trump has had successes, they have come “despite – not because of – the president’s leadership style, which is impetuous, adversarial, petty and ineffective”.

Rush to uncover the writer

A “House of Cards”-style plot twist in an already over-the-top administration, Trump allies and political insiders scrambled to unmask the writer.

Hotly debated on Twitter was the author’s use of the word “lodestar,” which pops up frequently in speeches by Vice President Mike Pence. Could the anonymous figure be someone in Pence’s orbit? Others argued that the word “lodestar” could have been included to throw people off.

The text of the op-ed was pulled apart for clues: The writer is identified as an “administration official”; does that mean a person who works outside the White House? The references to Russia and the late Senator John McCain – do they suggest someone working in national security? Does the writing style sound like someone who worked at a think-tank? In a tweet, the Times used the pronoun “he” to refer to the writer; does that rule out all women?

The newspaper later said the tweet referring to “he” had been “drafted by someone who is not aware of the author’s identity, including the gender, so the use of ‘he’ was an error”.