WASHINGTON (Reuters) - Top aides to Donald Trump scrambled on Thursday to deny authorship of an anonymous New York Times opinion column that slammed the U.S. president’s leadership style and described “a quiet resistance” to him within his own administration.

By early afternoon, eight senior officials had disavowed the piece, including Vice President Mike Pence, Secretary of State Mike Pompeo and Defense Secretary James Mattis, while hammering the author for writing it and the Times for publishing it.

Trump seethed about the piece and presented it as one more jab from the ranks of disgruntled critics in denial about his presidential successes, even as Washington was consumed with speculation about who wrote it.

First Lady Melania Trump said in a statement on Twitter, “To the writer of the oped - you are not protecting this country, you are sabotaging it with your cowardly actions.”

The article, published on Wednesday, appeared just days after the publication of excerpts from a new book by famed Watergate reporter Bob Woodward that portrays Trump as prone to impulsive decision-making. The excerpts described senior aides as sometimes disregarding his instructions to limit what they saw as damaging behavior.

On Wednesday, visibly angry at a White House event, Trump called the Times article a “gutless editorial,” and in a later tweet he suggested it was treasonous.

The Times opinion section said the piece was written by a senior official in the administration and that it was taking the rare step of publishing an anonymous article because disclosing the author’s identity would jeopardize the person’s job.

Senior aides, some of whom have also been denying episodes from Woodward’s book this week, lined up to disavow authorship of the piece, known as an op-ed for its place in the opinion section.

Pompeo said during a trip to India that he was not the author and condemned the Times for publishing it, while Pentagon spokeswoman Dana White said Mattis did not write the piece.

Homeland Security Secretary Kirstjen Nielsen spokesman Tyler Houlton said, “Secretary Nielsen is focused on leading the men and women of DHS and protecting the homeland - not writing anonymous and false opinion pieces for the New York Times.”

Nielsen, along with Pence and Director of National Intelligence Dan Coats were among the favorites on Thursday among gamblers trying their luck online at guessing the author.

A spokesman for Pence said the vice president does not write anonymous opinion columns. “The @nytimes should be ashamed and so should the person who wrote the false, illogical, and gutless op-ed,” spokesman Jarrod Agen said on Twitter.

Coats said in a statement that speculation that he or his principal deputy wrote the piece was “patently false.”

FILE PHOTO: U.S. President Donald Trump (C) dellivers remarks after attending a swearing-in ceremony for Defense Secretary James Mattis (R) with Vice President Mike Pence at the Pentagon in Washington, U.S., January 27, 2017. REUTERS/Carlos Barria/File Photo

The opinion piece, and Woodward’s book, which is published next week, follow many news articles during Trump’s 19-month presidency that have depicted turbulence at the White House under his leadership. The former reality TV star has had an unusually high level of staff turnover, and has sometimes been publicly critical of his top aides.

The critical spotlight on Trump’s leadership comes just two months before midterm elections in which his fellow Republicans are seeking to maintain control of Congress. The vote will be widely seen as a referendum on Trump.

WASHINGTON GUESSING GAME

The Times piece slammed Trump’s leadership style as “impetuous, adversarial, petty and ineffective” and called some of his decisions “half-baked, ill-informed and occasionally reckless.” It said some senior officials have been working from within to frustrate parts of Trump’s agenda and protect the country from his worst impulses.

Some of the guess-the-author game centered on whether the author worked in the White House or a federal agency. Language in the article, including the unusual word “lodestar,” was the subject of wide online speculation and language searches.

#NYTimesOpEd was among top-trending hashtags on Twitter.

White House spokeswoman Sarah Sanders tried to shut down the speculation.

“The media’s obsession with the identity of the anonymous coward is recklessly tarnishing the reputation of thousands of great Americans who proudly serve our country and work for President Trump. Stop,” she wrote on Twitter.

UN Ambassador Nikki Haley told reporters she was not the author. Treasury Secretary Steven Mnuchin’s spokesman Tony Sayegh said on Twitter it was “laughable to think this could come from the secretary.” Agriculture Secretary Sonny Perdue said through a spokesman that he was not the author, either.

Trump sought to portray the op-ed as a reflection of yet more anger by Democrats who have never accepted his surprise 2016 presidential election win.

He invoked the term “deep state” - used to portray people with a political agenda working against him - as well as his campaign promise to drain what he has called the corrupt Washington swamp.

“The Deep State and the Left, and their vehicle, the Fake News Media, are going Crazy - & they don’t know what to do,” he tweeted on Thursday morning.

“I’m draining the Swamp, and the Swamp is trying to fight back. Don’t worry, we will win!” he tweeted earlier.