ABCNews.com(WASHINGTON) — The New York Times on Wednesday published an anonymous op-ed attributed to a senior Trump administration official who writes that there is a group of officials working within the administration for the express purpose of thwarting what the author said are dangerous tendencies on the part of the president.

“I work for the president but like-minded colleagues and I have vowed to thwart parts of his agenda and his worst inclinations,” the anonymous individual writes. “…We believe our first duty is to this country, and the president continues to act in a manner that is detrimental to the health of our republic.”

The author claims to support the president’s policies but not the president’s temperament, painting a portrait of an unfocused president with rash tendencies and poor decision-making abilities.

“Meetings with him veer off topic and off the rails, he engages in repetitive rants, and his impulsiveness results in half-baked, ill-informed and occasionally reckless decisions that have to be walked back,” the anonymous official writes.

President Trump, in his first public reaction to the op-ed shortly after it was published, blasted the essay as “gutless” and further derided what he refers to as “the failing New York Times.”

“We have somebody in what I call the failing New York Times and he’s talking about he’s part of the resistance within the Trump administration. This is what we have to deal with. And, you know, the dishonest media, you people deal with it as well as I do. It is a disgrace,” he told law enforcement officers at a White House event.

“So when you tell me about some anonymous source within the administration, probably who’s failing and probably here for all the wrong reasons, now, and The New York Times is failing. If I weren’t here, I believe The New York Times probably wouldn’t even exist.”

The blistering essay comes just a day after advance excerpts of a highly critical book by veteran Washington reporter Bob Woodward were published and similarly painted a portrait of a careening chief executive whose worst impulses are tempered by behind the scenes work of top aides. The president has sought to discredit the book as a “work of fiction.”

The anonymous official goes on to lay out ways, specifically on the topic of foreign policy, where Trump appointees have worked to shape policies – such as on the topic of Russia – that are at odds with the president’s preferences in order to protect important norms.

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

The result is a two-track presidency,” the anonymous official writes in the Times.

The official says there were even discussions within the cabinet at one point to invoke the 25th Amendment in order to remove the president from office, but that officials instead charted a path of quiet dissidence.

“Given the instability many witnessed, there were early whispers within the cabinet of invoking the 25th Amendment, which would start a complex process for removing the president. But no one wanted to precipitate a constitutional crisis. So we will do what we can to steer the administration in the right direction until — one way or another — it’s over,” the official said.

White House press secretary Sarah Sanders also issued a blistering statement in reaction, calling the author a “coward” and saying the person should resign. She called for the Times to apologize as well.

“The individual behind this piece has chosen to deceive, rather than support, the duly elected President of the United States. 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,” Sanders said in the statement.

The Times explains its decision to publish the anonymous essay, saying it is being done at the author’s request to protect the person’s job, while also expressing the publication’s belief that providing the writer the assurance of anonymity “is the only way to deliver an important perspective to our readers.”