Over roughly the past day, President Trump has decried the “totally dishonest” media, with its “fake news” and “fake books.” He has argued that Google is biased against conservatives. And he has accused NBC News of “fudging” the tape of an interview with him that has been available online for more than a year.

The president has even declared there is no chaos in his White House, which he claimed is a “ ‘smooth running machine’ with changing parts,” despite the tumult that emanates almost daily from within its walls.

Trump’s assertions — all on Twitter, some false, some without clear evidence — come just over nine weeks before the midterm elections that could help determine his fate, and they are bound by one unifying theme: All of his perceived opponents are peddling false facts and only Trump can be trusted.

The president and his supporters are under siege, the tweets imply, from pernicious forces conspiring against them.

The recent objects of the president’s ire are a host of familiar if disparate targets — from special counsel Robert S. Mueller III’s “Rigged Russia Witch Hunt” investigation to cable news outlets to Silicon Valley — and reflect Trump’s ongoing effort to create a reality where he is firmly at the center and, perhaps more important, the arbiter of his own Trump-favorable truth.

The president’s tweetstorm late this week reflects a certain agitation with the news swirling around him, according to people close to Trump, including a growing anxiety within the White House about the possibility of the “I-word” — as the president sometimes refers to impeachment — and what a Democratic takeover of the House would mean. His tweet warning that “fake books” about his administration are “pure fiction,” for instance, was viewed by some as an effort to mitigate any possible damage from Bob Woodward’s upcoming book, “Fear: Trump in the White House.”

Trump’s latest social media proclamations are not premeditated, poll-tested strategy, these people added, but rather the president’s raw, visceral response to incoming challenges, and messaging to his base. One former White House staffer described Trump’s tweets this week as just the latest salvo in the long narrative arc he’s long been building against his favorite villains, including the media and Mueller’s probe. 

White House aides often simply work to provide context for and action off his tweets — policy staff has begun preparing memos for Trump focused on his concerns with alleged bias at major technology companies, an administration official said.

But many allies say Trump’s ad hoc messaging is an effective tactic for a president with a conductor’s ability to manipulate news cycles and a talent for connecting with his core supporters. 

“This is Trump at war — war with the elites; war with the permanent political class; war with the opposition party media, tech oligarchs, the Antifa anarchists,” Stephen K. Bannon, Trump’s former White House chief strategist, wrote in a text message. “This is the reason Trump is president — to take on the vested interests in this country for hard working Americans.”

And Rudolph W. Giuliani, one of Trump’s personal attorneys in the Russia probe, whose defense strategy often seems to be as much public relations as legal maneuvering, said that while the president is not necessarily claiming to be the only reliable narrator, he is highlighting what he believes is a pervasive bias in how conservatives are treated.

“He’s trying to point out that there’s a very, very heavy political motivation to everything they’re doing,” Giuliani said. “This has been the argument since Barry Goldwater and Ronald Reagan, that we’re not treated fairly. I think that problems of us are exaggerated into big national scandals, and problems for them are just not looked at.”

At a rally later Thursday in Indiana, Trump took aim at the news media, describing them as “dishonest, terrible people” and telling the crowd, “When you get good ratings, you can say anything.”

Yet as Trump offers his own version of the facts, his critics see darker motives.

“The widening circle of the parties that he’s accusing is predictable because I see Donald Trump as an authoritarian in the making or an authoritarian wannabe, and there’s always a transition process of this sort of leader asserting himself above all the authorities,” said Ruth Ben-Ghiat, a history professor at New York University who studies authoritarianism. “Every authoritarian leader eventually asserts himself as the only arbiter of truth.”

Ben-Ghiat added that the president’s fixation on Silicon Valley being rigged against conservatives — a tech-bias concern that his oldest son, Donald Trump Jr., also recently vocalized — is yet another sign of this behavior. “When Donald Trump is starting to raise the specter of trying to fiddle with search engines and saying that they are rigged — this raises alarm bells in me as a scholar of authoritarianism.”

The spate of frenetic tweets also underscores both “a confidence and desperation” on the part of the president,” said Frank Sesno, a former CNN Washington bureau chief who is now the director of the School of Media and Public Affairs at George Washington University. 

“Confidence that he is, in fact, the only reliable source,” Sesno said, “and desperation in that he is losing control of the narrative and needs to reassert his version of the truth.”

In elevating himself as the truthful authority, the president has repeatedly undermined his own Justice Department, portraying it as corrupt for investigating his campaign and ignoring his rivals. In a tweet Wednesday night, Trump also seemed to contradict his own secretary of defense, implying that even policies from top members of his own administration cannot always be trusted.

In that instance, Trump wrote that “there is no reason at this time to be spending large amounts of money on joint U.S.-South Korea war games” while he negotiates with North Korea — a statement that caused confusion after Defense Secretary Jim Mattis had said during a Pentagon news conference earlier in the week that while the U.S. military had suspended several of the largest war exercises, “we did not suspend the rest” and that “there are ongoing exercises all the time on the peninsula.”

Trump’s effort to create villains can have potentially devastating impact. He has decried the media as the “enemy of the people” as recently as this week, and on Thursday, the FBI arrested a man in California who had threatened to shoot Boston Globe staff, calling the newspaper “the enemy of the people” and “fake news.” 

“President Trump has no direct responsibility for this, but he has created a climate for making such ideas more possible by his very consistent attacks since 2015 on the press,” Ben-Ghiat said.

Barry Bennett, a former Trump campaign adviser, said the president is less actively trying to move public sentiment than reflecting back and amplifying the views of his existing supporters. “It’s more a byproduct of our flavored news,” he said. “You can now shop for news in any flavor you like, and so people put their trust in the news of the flavor they desire.”

The strategy is effective among Trump’s base, GWU’s Sesno said, but could backfire long-term. 

“It also serves to remind those not part of the base that he has this assertive and warped sense of reality,” Sesno said. “The danger to him is that at some point, it just wears so thin or rings so hollow or is so devalued by the constant repetition of it that it either loses impact or boomerangs.”