Moments after Sen. Bernie Sanders (I-Vt.) took the stage at his campaign rally in Phoenix on Thursday night, the crowd was on its feet cheering madly for the Democratic presidential candidate.

But those cheers were swiftly replaced by deafening boos when Sanders’s supporters noticed that one man standing behind the senator in an upper section of the Arizona Veterans Memorial Coliseum wasn’t waving a “Bernie” sign like many of those around him.

Instead, the man was holding a red flag above his head — and it was emblazoned with a swastika.

“It was absolutely wild,” Brianna Westbrook, a national surrogate for the Sanders campaign, told The Washington Post. “I never thought I would have seen a swastika at a political event. It’s gross.”

While people near the protester quickly ripped the offending item out of his hands and he was removed from the arena, the mere appearance of a Nazi flag at an event dedicated to a democratic socialist who could become the country’s first Jewish president sparked outcry. The moment, captured in videos and photos that circulated on social media Thursday night, was denounced as an act of anti-Semitism and prompted increased concerns about Sanders’s safety on the campaign trail.

“We can argue about which candidate should get the Dem nomination, but anti-Semitic acts have no place in this world,” tweeted Steven Slugocki, chairman of the Maricopa County Democratic Party. “This is absolutely abhorrent.”

Sanders addressed the incident at a news conference Friday in Phoenix, denouncing the flag as “the most detestable symbol in modern history.”

“It is horrific,” he said. “It is beyond disgusting to see that in the United States of America there are people who would show the emblem of Hitler and Nazism.”

The senator did not appear to see the flag as he thanked the crowd for coming out Thursday night. Videos showed him only turning around in time to witness the man being escorted out.

“Whoever it was, I think they’re a little outnumbered tonight,” Sanders told the crowd with a smile.

The swastika flag was just one incident involving protesters that disrupted Thursday’s event, Westbrook told The Post. Later in the night, other people waving banners bearing President Trump’s name also got into minor scuffles with Sanders supporters and were promptly removed from the venue by uniformed officers.

But for many, the sight of the swastika was particularly surprising.

“I was expecting Trump supporters to be protesting. I didn’t expect a swastika flag to be unfurled,” Orlando Garrido, a rally attendee, told The Post. “I never thought I would actually see something like that.”

On Twitter, the display was widely condemned as observers pointed out that Sanders’s Polish relatives were murdered in the Holocaust.

“You don’t have to support him to show him some empathy & solidarity against this hate,” one person tweeted.

A number of people also went after the protester, slamming him as a “racist” and a “white supremacist.” By late Thursday, another video surfaced, showing a man identified as the protester outside the venue shouting the n-word at a black Sanders supporter.

The Anti-Defamation League identified the protester Friday as Robert Sterkeson, a resident of Arizona. According to the ADL, Sterkeson is “a self-described ‘stunt activist’ who has harassed a range of Jewish and Muslim organizations and events.”

When reached for comment, Sterkeson, 37, told The Post he did not regret bringing the flag to the event.

On Thursday, others cited the incident as more evidence that additional security, such as Secret Service agents, should be provided for presidential candidates. Thursday’s moment came just days after Jill Biden helped block vegan protesters who ran on the stage with placards and came within a few feet of her husband, former vice president and presidential contender Joe Biden.

In a statement released Thursday ahead of Sanders’s rally, the Secret Service pushed back against criticisms that it is “unprepared for candidate protection.” The agency noted that candidates must formally request Secret Service protection through the Department of Homeland Security and none have done so yet.

“The Agency remains fully prepared to execute this vital mission and any suggestion to the contrary breeds unfounded public concern and irresponsibly misrepresents the skill and professionalism of our workforce,” the statement said.

Meanwhile, people praised Sanders’s supporters for their quick reaction to the protester. Video showed that the man held the flag up for less than 20 seconds before it was snatched away.

Though Thursday’s protest was handled without incident, Westbrook said the moment was still scary.

“It really wakes you up and you see how bad things really are and the climate that we’re in,” she told The Post.