Donald Trump has lashed out at an opinion piece written by an anonymous senior official within his administration, who claimed to be part of a "resistance" seeking to curtail the president's "worst inclinations".

The explosive column in the New York Times rocked the White House on Wednesday, reportedly triggering a frantic hunt for its author.

According to the “senior administration official”, whose opinion piece was called "gutless" by Mr Trump, members of the president's cabinet were so worried by his erratic, impulsive behaviour they discussed using extreme constitutional measures to remove him from power.

The 25th amendment is designed to be used in the case of an incapacitated commander-in-chief. However, the article claims that senior figures considered deploying it to oust the president.

“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,” writes the anonymous author. “But no one wanted to precipitate a constitutional crisis.”

Instead a cabal of senior figures is now working to thwart the president’s more “misguided impulses” or “worst inclinations”, claims the writer, whose article is headlined “I Am Part of the Resistance Inside the Trump Administration”.