When President Donald Trump grows frustrated with advisers during meetings, which is not an uncommon occurrence, he sits back in his chair, crosses his arms and scowls. Often he erupts. “Freaking idiots!” he calls his aides. Except he uses a more pungent word than “freaking.”

For two years, Mr Trump has waged war against his own government, convinced that people around him are fools. Angry that they resist his wishes, uninterested in the details of their briefings, he becomes especially agitated when they tell him he does not have the power to do what he wants, which makes him suspicious that they are secretly undermining him.

Now, the president who once declared that “I alone can fix” the system increasingly stands alone in a system that seems as broken as ever. The swirl of recent days — a government shutdown, spiralling scandals, tumbling stock markets, abrupt troop withdrawals and the resignation of his alienated defence secretary — has left the impression of a presidency at risk of spinning out of control.

At the midpoint of his term, Mr Trump has grown more sure of his own judgment and more cut off from anyone else’s than at any point since taking office. He spends ever more time in front of a television, often retreating to his residence out of concern that he is being watched too closely. As he sheds advisers at a head-spinning rate, he reaches out to old associates, complaining that few of the people around him were there at the beginning.

Mr Trump is said by advisers to be consumed by the multiplying investigations that have taken down his personal lawyer, campaign chairman, national security adviser and family foundation. He rails against enemies, who often were once friends, nursing a deep sense of betrayal and grievance as they turn on him.

“Can you believe this?” he has said as he scanned the torrent of headlines. “I’m doing great, but it’s a war every day.”

“Why is it like this?” he has asked aides, with no acknowledgement that he might have played a role. The aides, many of whom believe he has been treated unfairly by the news media, have replied that journalists are angry that he won and proved them wrong. He nods in agreement at such explanations.

As the president vents, he constantly rattles off what he sees as underappreciated accomplishments. “Look what I did for Mexico and Canada,” he has told allies. “Look what’s happened with terrorism.”

US President Donald Trump listens during a phone conversation with Mexico's President Enrique Pena Nieto on trade in the Oval Office of the White House in Washington, DC on 27 August 2018 ((Mandel Ngan/ AFP/Getty Images))

The portrait that emerges from interviews with about 30 current and former administration officials, personal friends, political allies, lawmakers and congressional aides suggests a president who revels in sharp swings in direction, feels free to disregard historic allies and presides over near constant turmoil within his own team as he follows his own instincts.

White House officials did not respond to requests for comment. But as the president struggles to find a way forward, the path is about to become much more hazardous. As tumultuous as events have been so far, Mr Trump’s first two years may ultimately look calm compared to what lies ahead.

In less than two weeks, Democrat Nancy Pelosi will take the speaker’s gavel held until now by the outgoing Republican Paul Ryan and subpoena-wielding House Democrats will be empowered to investigate Mr Trump’s family, business, campaign and administration. At some point after that, he will face the results of whatever Robert Mueller, the special counsel, finds about campaign ties to Russia and obstruction of justice.

At some point after that, Ms Pelosi may come under enormous pressure from her liberal base to open an impeachment inquiry and many Republicans anticipate a battle over whether Mr Trump committed high crimes and misdemeanours even if they hold enough votes in the Senate to block removal. Amid all that is a rising budget deficit that will shrink Mr Trump’s domestic options and signs of a possible economic downturn that would undercut his most potent bragging point.

“Nothing he’s going to face in the next two years is going to be like the challenges of the previous two years,” said Michael Steel, a longtime adviser to Republicans like Mr Ryan and former Speaker John Boehner. “Given the staff turnover and the increasing feeling that the president is encircled or cornered by legal and political enemies, it’s entirely possible it gets worse, not better.”

Yet even with a 38 percent approval rating in Gallup polling, Mr Trump has dominated the national conversation as no other modern president has, and his base thrills at his fights with the establishment, seeing him as a warrior against self-satisfied elites who look down on many Americans. Determined to maintain that base, he has insisted — despite the seemingly long odds — on his pledge of a border wall, aware that abandoning his signature campaign promise would make him less authentic, the quality that his voters often cite as his appeal.

As a result, a partisan war may be just what he wants. He has privately told associates that he is glad Democrats won the House in last month’s midterm elections, saying he thinks that guarantees his re-election because they will serve as a useful antagonist. That may be bravado, but history provides some support. Bill Clinton and Barack Obama, his Democratic predecessors, both endured even bigger midterm setbacks and went on to win re-election.

“It’s absolutely fair to say that it’s better to have Nancy Pelosi as a foil than Paul Ryan as a foil,” said Marc Short, the president’s former legislative affairs director. “It’s better for the party and it’s better for unity.” He added: “The reality is the Democrats could overplay their hand.”

Both sides gamely talk about possible cooperation on issues like rebuilding the nation’s tattered network of roads, bridges and other infrastructure. “The opportunity in the era of divided government is to work with both sides to get something done for the country,” said Representative Josh Gottheimer, co-chairman of the bipartisan Problem Solvers Caucus.

Recent days showed the possibilities when Congress overhauled the criminal justice system, the most significant bipartisan domestic legislation of Mr Trump’s tenure. Mr Trump has hopes of winning bipartisan support for his new trade deal with Mexico and Canada. But one congressional Democrat said the party has gone from thinking it could make discrete deals with Mr Trump to believing he must be stopped at all costs because he is so dangerous.

Mr Trump has struggled with fellow Republicans lately too. They objected loudly to his decisions to draw down troops from Syria and Afghanistan and pushed through a Senate resolution essentially rebuking his handling of Saudi Arabia after the assassination of dissident Jamal Khashoggi. The departure of Defense Secretary Jim Mattis, who protested the troop pullouts and Mr Trump’s cavalier approach to America’s alliances, sent shudders through Republican ranks.

House conservatives, meanwhile, revolted against Mr Trump when he seemed to retreat on his demand for border wall funding to avert a government shutdown. At the same time, Senate Republicans, who had voted unanimously to keep the government open without the wall money Mr Mr Trump had demanded, were angry when he reversed course and refused to sign such a measure.

Such conflict comes with a cost. Mr Trump has a way of stepping on his own successes. The border wall fight overshadowed his signing of the criminal justice overhaul. The abrupt way he decided to withdraw from Syria overshadowed the military victories against the Islamic State group. Mr Trump’s focus during the midterm campaign on a caravan of migrants overshadowed the positive economic story he had to tell before the latest stock market gyrations.

Advert featured in Times Square slams Donald Trump for migrant deaths and border wall

“When he’s talking about the economy, he’s gotten a much more positive reaction,” said David Winston, a Republican pollster. “Obviously on other topics he hasn’t been able to get it to the point where he’s able to create an overall job approval. The question is do you address weaknesses or do you play to your strengths?”

Always impulsive, the president increasingly believes he does not need advisers, according to people close to him. He is on his third chief of staff, third national security adviser, sixth communications director, second secretary of state, second attorney general and soon his second defence secretary. Turnover at the top has reached 65 percent, according to the Brookings Institution.

Some left in a cloud of corruption allegations, including his health and human services secretary, his Environmental Protection Agency chief and, most recently, his interior secretary. Others left after clashing with Mr Trump. Mr Mattis was the last of the so-called axis of adults seen by some as tempering a volatile president, following the ouster of Rex Tillerson as secretary of state, H.R McMaster as national security adviser and John Kelly as chief of staff.

“Rex Tillerson and Jim Mattis are two of the finest people ever to serve in government,” said Steve Goldstein, who was undersecretary of state until he was fired along with Mr Tillerson. “They were very close and worked hard at trying to do what was best for the country and sometimes that meant being brutally honest with folks at the White House.”

But Fred Fleitz, who worked for nearly six months this year as chief of staff for John Bolton, the current national security adviser, said the new team is more cohesive and better suited to Mr Trump than one constantly undermining him.

“He came in as the ultimate outsider and he brought in some unorthodox policies that worked and he tried some things that didn’t work, and one of the things that didn’t work was bringing in some staffers who didn’t work like McMaster and Tillerson,” Mr Fleitz said.

In a recent public talk, Mr Tillerson said out loud what others say in private, that Mr Trump often pushes for actions that exceed his authority and does not like it when told he cannot do something. He bristles at constraints and expresses envy of autocrats like President Xi Jinping of China who do not have to deal with independent power centres like the Federal Reserve or the courts.

In recent days, Mr Trump has asked aides whether he can fire Jerome Powell, the Fed chairman he appointed, telling advisers that Powell will “turn me into Hoover,” a reference to the Great Depression-era president. During a meeting with German car executives this month, Mr Trump threatened to impose higher fuel efficiency standards on their imported cars than required on American vehicles even though aides told him he could not do that.

And he can be hard on his staff. He regularly curses at them, some say. Even his humour can be abrasive. When Larry Kudlow, his economics adviser, returned after a heart attack this year, the president ribbed him in front of aides. “Larry, you’re here six weeks and you had a heart attack?” Others laughed uncomfortably.

More recently, the president has told associates he feels “totally and completely abandoned,” as one put it, complaining that no one is on his side and that many around him have ulterior motives. That extends even to his son-in-law, Jared Kushner, who was credited for helping push through the criminal justice bill, praise that Mr Trump took note of.

Longtime associates said Mr Trump’s relationship with his children has grown more removed and that he feels he does not have a friend in the White House. He disagrees with Kushner and Ivanka Mr Trump much of the time, but cannot bring himself to tell them no, leaving that instead to Mr Kelly, according to former aides. That made Mr Kelly the heavy, they said, and therefore the target of their ire until he was finally forced out.

Who could be running against Trump in 2020? Show all 23 1 /23 Who could be running against Trump in 2020? Who could be running against Trump in 2020? Joe Biden The former vice president - poised to be a frontrunner - has announced his run. He recently faced scrutiny for inappropriate touching of women, but was thought to deal with the criticism well AFP/Getty Who could be running against Trump in 2020? Bernie Sanders The 2016 runner-up has announced that he will be running again in 2020 Getty Who could be running against Trump in 2020? Hillary Clinton The 2016 Democratic presidential candidate and former Secretary of State says she is “still considering” whether she will run again. Getty Who could be running against Trump in 2020? Pete Buttigieg The Indiana mayor and war veteran will be running for president. If elected, he would be the first openly LGBT+ president in American history. Getty Who could be running against Trump in 2020? Kamala Harris The former California attorney general will be running for president in 2020. Introduced to the national stage during Jeff Sessions’ testimony, she has endorsed Medicare-for-all and proposed a major tax-credit for the middle class. AP Who could be running against Trump in 2020? Elizabeth Warren The Massachusetts Senator has formally launched her bid for president in 2020. A progressive Democrat, she is a major supporter of regulating Wall Street. AP Who could be running against Trump in 2020? Beto O’Rourke The former Texas congressman told Oprah Winfrey that he “has been thinking about running for presidency”, but stopped short of formally announcing his bid to run in 2020. AFP/Getty Who could be running against Trump in 2020? Wayne Messam Mayor of the city of Miramar in the Miami metropolitan area, Wayne Messam has announced his bid. He intends to run on a progressive platform against the "broken" federal government. He favours gun regulations and was a signatory to a letter from some 400 mayors condemning President Trump's withdrawal from the Paris Climate Accord. Vice News Who could be running against Trump in 2020? Kirsten Gillibrand The New York Senator formally announced her presidential bid in January, saying that “healthcare should be a right, not a privilege.” Getty Who could be running against Trump in 2020? Cory Booker The New Jersey Senator has announced that he will be running for the presidency in 2020. If he secures the nomination he said finding a female vice president would be a priority. Getty Who could be running against Trump in 2020? John Delaney The Maryland congressman was the first to launch his bid for presidency, making the announcement in 2017. AP Who could be running against Trump in 2020? Julian Castro The former San Antonio mayor announced his candidacy in January and said that his running has a “special meaning” for the Latino community in the US. Getty Who could be running against Trump in 2020? Tulsi Gabbard The Hawaii congresswoman announced her candidacy in January, but is likely to face tough questions on her past comments on LGBT+ rights and her stance on Syrian President Bashar al-Assad. Getty Who could be running against Trump in 2020? Andrew Yang The entrepreneur has announced his presidential candidacy, and has pledged that he would introduce a universal basic income of $1,000 a month to every American over the age of 18. AFP/Getty Who could be running against Trump in 2020? Marianne Williamson The author and spiritual advisor has announced her intention to run for president. She had previously run for congress as an independent in 2014 but was unsuccessful. Getty Who could be running against Trump in 2020? John Kerry The former secretary of state has said he is still thinking about whether to run. Getty Who could be running against Trump in 2020? Michael Bloomberg The entrepreneur and former New York mayor– with a net worth of around $50bn – has said he will decide by the end of February whether to seek the presidency. AFP Who could be running against Trump in 2020? Howard Schultz Former Starbucks CEO Howard Schultz has not yet ruled out running for president in 2020, despite criticism that his bid could help re-elect Mr Trump by dividing the Democrat vote. AP Who could be running against Trump in 2020? Eric Holder The former attorney general has said he will decide in “the next month or so” whether to run as a 2020 presidential candidate. AP Who could be running against Trump in 2020? Eric Swalwell The California congressman said he is “ready to do this” and will decide before April whether to run. MSNBC Who could be running against Trump in 2020? Terry McAuliffe The former Virginia governor, who worked to elect Democratic governors during 2018 midterms, said there was a “50 per cent” chance he would run. AP Who could be running against Trump in 2020? Sherrod Brown The Ohio senator is still undecided about whether to run for president in 2020. Who could be running against Trump in 2020? Mitch Landrieu The former New Orleans mayor said he doesn’t think he will run for president, but “never say never”. AP Photo/Jacquelyn Martin

Mr Trump has spent far less time lately with older friends. The sense of isolation was on display at this month’s holiday parties when he appeared for a few minutes, took a few perfunctory photographs with preselected guests and then disappeared back upstairs rather than mingle. He spent part of this pre-holiday shutdown weekend alone until Melania could return from Florida.

Mr Trump still views the presidency through the lens of a television showman. He told his staff that he wanted a fireworks display over Mount Rushmore. Before signing the farm bill, he posted a goofy video of himself at the 2005 Emmy Awards dressed in overalls and a straw hat, holding a pitchfork and singing the theme song to the old television show “Green Acres.”

For election night in November, he insisted on throwing a lavish party in the East Room and originally wanted aides to be on display for his guests, a simulation of officials gathering election return information like aides did at MrTrump Tower in 2016. When White House officials warned that a party would look discordant given the likelihood of losing the House, he insisted on going forward anyway.

By all accounts, Mr Trump’s consumption of cable television has actually increased in recent months as his first scheduled meetings of the day have slid back from the 9 or 9.30am set by Reince Priebus, his first chief of staff, to roughly 11am many mornings. During “executive time,” Mr Trump watches television in the residence for hours, reacting to what he sees on Fox News. While in the West Wing, he leaves it on during most meetings in the dining room off the Oval Office, one ear attuned to what is being said.

Of late, allies concede, the news has been particularly grim. He was infuriated by his former personal lawyer, Michael Cohen, who pleaded guilty to organising an illegal scheme to pay hush money to women to keep quiet about alleged affairs with Mr Trump before the 2016 election, a scheme he said Mr Trump had directed.

Still, for all the reports of a fuming president alarmed at possible impeachment, Mr Trump rarely expresses such specific anxiety out loud, associates said. Instead he expresses frustration, anger, mania — all of which aides read like tea leaves to discern what lies beneath.

“It will be a challenge not to be consumed by it,” Short said. “It would only be human when it’s the coverage leading the news every day to be distracted, but it will be important to have the internal discipline not to be.”

No one outside of Mueller’s office, of course, knows for sure what he will report but so far he and other prosecutors have drawn a devastating picture of a president surrounded by people who have lied to authorities, cheated on their taxes, skirted campaign finance laws and secretly worked for foreign interests. The question is what Mueller will say about Mr Trump.

“Does he create a story that the man never put the presidency first?” asked Doris Kearns Goodwin, whose newest book, “Leadership: In Turbulent Times,” chronicles four presidents. “There has to be a narrative. The individual things may not hit the people who support him but if there’s an overall narrative, people may understand.”

Mr Trump has not helped himself with decisions that opponents use to draw a narrative of a president unusually deferential to Russia, including his withdrawal of troops in Syria, which drew the public approval of President Vladimir Putin.

“Mueller will decide whether there’s collusion with the Russians on the election,” said Mayor Rahm Emanuel of Chicago, a former White House chief of staff to Mr Obama. “But we can now say there’s collusion with the Russians on foreign policy and it’s not to America’s benefit.”

More recently, Mr Trump has taken to spending time reminiscing about the happier days of his candidacy and his 2016 victory. He spent the fall showing different groups of visitors what he calls his love letters from North Korea’s iron-fisted dictator, Kim Jong Un, expressing admiration for Mr Trump. And he still takes joy in aspects of the job, primarily those that demonstrate power. “The roads closed for me!” he declared to friends this year after a motorcade ride.

But those highs have been hard to recapture. The days are filled with conflict, much of it of his own making. More advisers are heading for the door. The divisions are widening, not closing. If it is a “war every day,” there are no signs of peace.

“What I’m trying to figure out is where does it end,” Mr Goldstein said. “The language gets coarser on all sides. The respect for the office of the presidency seems less to me than it was. How do we move people back? Or are we in the new reality?”