Several years ago, a psychiatrist at Bellevue Hospital in New York began to notice a pattern among people seeking treatment: Dozens believed that their lives were being constantly filmed and broadcast, as though they were the stars of their own versions of “The Truman Show.” That film, in fact, became the name for this particular, and particularly modern, affliction.

The Bellevue psychiatrist, Joel Gold, published research about the syndrome with his brother, Ian Gold, seeking to determine how culture and mental illness overlapped. There was no suggestion that the movie itself made people delusional but, rather, that the movie informed the shape of the delusion. It was, if you will, a framework on which the patient’s mental illness could be hung.

It’s not clear that either Cesar Sayoc, who allegedly mailed explosive devices to a number of Democratic politicians and to CNN last week, or Robert D. Bowers, who allegedly killed 11 people at a synagogue on Saturday, suffered from mental illness. But there’s certainly evidence that dominant political rhetoric — including rhetoric promoted by President Trump — may have served as a similar framework for their dangerous, violent actions.

Bowers was apparently an active user of the social-networking site Gab, a site created in part to offer a home to those barred from other platforms because of their extreme views. A user identified as Robert Bowers posted a message shortly before the attack at Pittsburgh’s Tree of Life synagogue. In the message, the writer took issue with a Jewish refugee organization called the Hebrew Immigrant Aid Society, which helps resettle refugees in the United States.

“HIAS likes to bring invaders in that kill our people,” the message read. “I can’t sit by and watch my people get slaughtered. Screw your optics, I’m going in.”

There is an idea among anti-Semitic groups that there’s a Jewish conspiracy to undercut white populations with nonwhite immigrants. During the torchlight march by white nationalists in Charlottesville, last year, the chanted slogan “Jews will not replace us” seemed to get at that notion.

But in the current political dialogue, there’s an undercurrent to the idea that prominent Jewish people are supporting dangerous immigrants.

Trump has repeatedly sought to focus attention on a group of migrants traveling through Mexico, hinting darkly that the caravan is riddled with criminals and terrorists. It’s part and parcel of his overall rhetoric on certain groups of immigrants and refugees. It was explicit in his campaign: Those crossing the U.S.-Mexican border are criminals, by default, and those who are Muslim should be barred entirely.

To disparage the migrants, Trump retweeted a video showing people purported to be members of the caravan being handed money, a video that had previously been tweeted by his ally Rep. Matt Gaetz (R-Fla.). Gaetz’s tweet questioned the origin of the money, wondering if it came from U.S. organizations — or from billionaire George Soros, a frequent target of conservatives for his political spending and of anti-Semites for his religion.

Trump has looped Soros into his own conspiracies, too. When Justice Brett M. Kavanaugh’s nomination to the Supreme Court was under consideration, Trump suggested that those protesting his appointment were being paid by the billionaire.

Trump has never implied that Soros or other prominent Jewish Americans are funding refugees to come to the United States and replace white Americans. But the president’s comments about migration are helping to elevate skepticism and fear about immigrants and refugees in the public perception, especially as they’re echoed in the media and among his supporters.

On the Fox Business network, hours after Bowers allegedly killed 11 people at that synagogue in Pittsburgh, host Lou Dobbs, long known for his anti-immigration rhetoric, interviewed a guest who insisted that the caravan was getting money indirectly from the “Soros-occupied State Department.” One of the last tweets from the Robert Bowers Gab account included a cartoon referring to “ZOG” — Zionist-occupied government.

Bowers’s anti-Semitism didn’t derive from Trump; in fact, he seems to have opposed the president. The political anger of alleged mail-bomber Sayoc, though, overlapped with Trump’s rhetoric much more neatly.

Consider this quote from Ronald Lowy, who served as legal counsel for Sayoc.

“Had no interest in politics, was always at the nightclubs, the gyms, wherever he thought he could meet people, impress people,” Lowy told The Post about Sayoc. “And along came the presidential campaign of Donald Trump, who welcomed all extremists, all outsiders, all outliers, and he felt that somebody was finally talking to him.”

Joel Gold, the Bellevue psychiatrist, described the sorts of people who were susceptible to the Truman Show Delusion.

“People who choose to be the center of attention, have concerns about social standing, or who may fear being in [the] public eye or seek it out, may be more drawn to identify with this delusion,” Gold wrote. “I don’t think people are making it up or choosing it.”

A van and social media accounts believed to belong to Sayoc were peppered with both fringe and mainstream political rhetoric. There were mentions of chemtrails (a conspiracy theory holding that planes spread mind-altering chemicals) and mentions of Republican candidates in Florida’s elections. Sayoc embraced run-of-the-mill conspiracy theories about the administration of Barack Obama and more bizarre ones, such as speculating that Soros helped fake the mass shooting at a school in Parkland, Fla., in February. He at one point posted Soros’s home address on Twitter; that home was one of the targets to receive a bomb in the mail.

Mostly, though, the consistent theme is Trump. Trump appears on Sayoc's van repeatedly. Incorrect assertions from Trump are included among the phrases plastered on the vehicle's windows. Those who were targeted with bombs were those with whom Trump had taken issue: CNN, former intelligence officials, Democratic leaders and politicians, actor Robert DeNiro. Sayoc may have been unstable before Trump, but Trump clearly offered him a political lattice from which to build outward.

We noted last week that the bombs being sent to political leaders had drawn the media's attention away from that caravan — a shift that frustrated Trump. (The one network that continued to discuss the caravan over the mail bombs? Fox Business.)

Trump was explicit about the reason for his frustration.

"Republicans are doing so well in early voting, and at the polls, and now this ‘Bomb’ stuff happens and the momentum greatly slows — news not talking politics,” he complained on Twitter. He'd previously said that the caravan should be a reason for people to vote against Democrats. Suddenly, people wanted to talk about something else, right as the midterms were looming.

That’s the critical context for Trump. His rhetoric on immigration and refugees may be deeply felt, but he’s amplifying those concerns now for the same reason that he did in 2015 and 2016: electoral politics. The caravan is far from the border and winnowing in size, but Trump wants to talk about it because he understands the powerful fear that the idea of people headed to the border can engender.

Trump’s rhetoric hasn’t been only about the danger of immigrants, of course. He has also insisted that the choice between the parties is “jobs” or “mobs” — with Democrats representing the latter in the form of angry protesters. (Some, remember, paid by Soros.) In an audio clip obtained by CNN, Trump, without offering any evidence, warned that a Republican loss in November could lead to violence by the left.

A central question about the attempted bombings and the synagogue shooting is: Why now? Is it a coincidence that both of those acts happened at this moment? Or was the bomber, allegedly Sayoc, reacting in part to the assertion that Democrats were being violent? Was the synagogue shooter, allegedly Bowers, reacting to the increased urgency fomented by Trump and his allies about the risk of migrants coming to the United States?

Let’s say that both the attempted mail bombings and the synagogue shooting were carried out by people who held the precise opinions expressed by Sayoc and by that Gab account. Let’s say, further, that the perpetrators of those acts were in fact mentally ill. Again, in the Truman Show Delusion, it’s not suggested that the movie made people delusional, but that it gave people a new conduit for their existing delusions. If we extend that idea, one can and should note that mental illness played a role in the attacks but that the framework of the existing political rhetoric may have pointed toward particular targets. But we don’t need that overlay of mental illness. The prevalence of this rhetoric means it serves as a framework for a lot of political discussion, not just at the extremes.

So we have to note why that rhetoric exists: because Trump and his allies think that concern about migrants and about Democratic violence will help them win elections, whether or not they think those concerns are valid.