An opinion piece in the New York Times by an anonymous senior administration official, claiming to be part of a “resistance” working from within to thwart Donald Trump’s “worst inclinations”, has set off a wild guessing game inside and outside the White House on the author’s identity.

The newspaper stayed tight-lipped about the official’s identity, saying that even within the organisation very few people had been told, as part of efforts to protect their anonymity.

In an extraordinary move, a furious Trump demanded that “the Times must, for National Security purposes, turn him/her over to government at once!” He had previously tweeted: “TREASON?”

Donald J. Trump (@realDonaldTrump) 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!

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

No definitive information had emerged on Thursday morning to suggest who was behind the article. But Trump allies and political insiders scrambled to unmask the writer, with aides and staffers inside the White House reportedly engaged in just as frenzied a guessing game behind closed doors as pundits were in public.

“It’s like the horror movies when everyone realises the call is coming from inside the house,” a former White House official told the Washington Post.

Sign up to receive the top US stories every morning

The text of the op-ed was pulled apart for clues. For instance, 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 thinktank? 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”.

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

Pence’s office has firmly denied the allegation that he was the author.

Mike Pence and Mike Pompeo deny writing explosive op-ed attacking Trump Read more

Pence was not the only high-profile official named in the guessing game; just about every big name in the White House was somebody’s choice, including Sanders, the chief of staff, John Kelly, the White House adviser Kellyanne Conway, the departing White House counsel Don McGahn and even Trump’s daughter Ivanka or his wife Melania. But other observers were convinced the writer would turn out to be a relatively little-known but powerful official.

According to the Washington Post, Trump told aides he believes the official works in national security or at the Justice Department. Some observers speculated that the op-ed’s references to Russia and the late senator John McCain suggested someone in national security.

Cabinet secretaries were also named in the speculation: the attorney general, Jeff Sessions, who has an obvious motive after months of Trump’s attacks and taunts against him, or the defence secretary, Jim Mattis, who is widely seen as reining in some of Trump’s wilder impulses on the world stage.

The only clue offered by the Times was that the author was “a senior official in the Trump administration”. That description quickly drove its own set of speculation: how high up, exactly, qualifies as senior? Does administration official mean the person works inside or outside the White House? The paper would not say.

Donald Trump demands New York Times reveal op-ed author's identity Read more

Showing her trademark ability to attract attention, the former administration official Omarosa Manigault Newman tweeted that clues about the writer’s identity were in her recently released tell-all book, offering a page number: 330. The reality star writes on that page: "Many in this silent army are in his party, his administration, and even in his own family."

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”.

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. And they were published a day after the release of details from an explosive new book by veteran journalist Bob Woodward that laid bare concerns among the highest echelon of Trump aides about the president’s judgment.

Play Video 5:26 What is the 25th amendment and could it remove Trump? – video explainer

The writer of the Times op-ed said Trump aides were 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."

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."