The official says the root of the problem is the president's "amorality"

US President Donald Trump's suggested an official - who wrote an anonymous newspaper article - could be guilty of treason.

The opinion piece in The New York Times claims the author is part of a White House 'resistance' which is working to frustrate the president's agenda.

It calls him 'erratic', 'amoral' and 'petty'.

"It may be cold comfort in this chaotic era, but Americans should know that there are adults in the room," the official wrote.

"We fully recognise what is happening. And we are trying to do what's right even when Donald Trump won't."

File photo

"To be clear, ours is not the popular 'resistance' of the left.

"We want the administration to succeed and think that many of its policies have already made America safer and more prosperous.

"But 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 root of the problem is the president's amorality.

"Anyone who works with him knows he is not moored to any discernible first principles that guide his decision making."

The official claimed that many staff have decided it is better to avoid a constitutional crisis by trying to steer government in the right direction until Mr Trump is no longer president.

Mr Trump's responded by questioning whether the person exists.

"The failing New York Times has an anonymous editorial - an you believe it? Antonymous. Meaning gutless, a gutless editorial".

Mr Trump's press secretary, Sarah Huckabee Sanders, claimed the author had chosen to "deceive, rather than support, the duly elected President of the United States".