If he had to do it again, hockey legend Mike Eruzione said, he would not put on the red “Keep America Great” hat.

He and his teammates from the 1980 U.S. Olympic hockey squad hadn’t meant to make a grand political statement when they appeared onstage as President Trump’s surprise guests at a campaign rally in Las Vegas on Friday. They happened to be in town to celebrate the 40th anniversary of the “Miracle on Ice” — their shocking upset of the Soviet Union en route to the gold medal, perhaps the most unifying moment in American sports history — when they got a call from Trump’s campaign inviting them to a private photo line with the president.

The next thing they knew, Eruzione said, Trump was introducing them at the rally and a campaign aide was handing them the caps as they took the stage. Four of the former players chose not to wear them — but 10 others did, prompting a huge backlash on social media from Trump’s critics, who view the distinctive red campaign hats as sharply politicized symbols of hate, racism and xenophobia.

“You going to light into me, too? We’re getting killed!” Eruzione said in an interview. Now serving as the director of special outreach at his alma mater, Boston University, Eruzione said he has received angry calls and messages from the school’s alumni. One said he purchased Eruzione’s new book about the 1980 team but no longer intends to read it. His Twitter mentions are a nightmare.

One message read: “In 1980, you beat the Russians, and yesterday the Russians beat you.”

“If we knew we were going to piss off this many people, we probably would not have put the hats on,” said Eruzione, 65, who served as the team’s captain and scored the game-winning goal against the Soviet team. “That’s the big question here. A lot of the stuff I got was, ‘You guys said it’s not political, but when you put the hats on, you made it political.’ ”

The “Miracle” team is the latest group to become entangled in the fierce cultural fight over the meaning of the Trump campaign’s most successful piece of merchandise, one that has raised tens of millions of dollars since 2016, according to Brad Parscale, Trump’s 2020 campaign manager. Last spring, Parscale said, the campaign surpassed 1 million sales of the $25 red “Make America Great Again” hats, featuring the 2016 campaign slogan in white lettering. That was before Parscale’s team unveiled a 2020 update with the new slogan, “Keep America Great.”

Though Trump campaign officials this week declined to provide an updated tally of how many hats have been sold, their ubiquity was evident at the Las Vegas rally, where it appeared that a majority in the crowd of thousands were wearing them.

Beyond their fundraising prowess, the “MAGA” and “KAG” hats have served as potent marketing for the president’s specific brand of nationalistic, us-versus-them politics, through which he has risen to power by provoking and accentuating the nation’s deep divisions of race, ethnicity and gender.

Over the years, the hats have become suffused with the divisive rhetoric of a president whose campaign rally refrains of “Build the wall” and “Lock her up” have stirred up his conservative base and outraged his liberal and moderate critics. The MAGA slogan has been impugned by critics as an implicit desire to return to an era in American history when the white male ruling class did not feel threatened by minorities and women.

“It’s hard to believe there are still people who don’t get that it means, ‘Keep America white,’ and ‘Keep America free of Mexican immigrants,’ ” said Matthew A. Sears, a professor of classics and ancient history at the University of New Brunswick in Canada who has written critically about the Trump hats.

“When people say it’s ‘just a hat,’ and you can’t judge a book by its cover and you can’t attribute racism to it — that’s how symbols work,” Sears added. “It’s basically like a uniform: It’s a way to signal in shorthand something that stands for a whole realm of policies or positions.”

Regardless of the intent of those who wear the Trump hats, they have been at the center of a number of highly charged incidents.

In November, Washington Nationals catcher Kurt Suzuki enthusiastically donned a MAGA hat during the team’s White House celebration with Trump after winning the World Series, prompting the president to physically embrace him. The scene provoked an outcry on social media from fans pledging to no longer support him, but Suzuki professed he was “just trying to have some fun” and not being political.

Two weeks ago, Trump tweeted a short clip from HBO’s “Curb Your Enthusiasm” in which comedian Larry David de-escalates a road rage confrontation with a tough-looking biker by donning a red MAGA hat. “Tough guys for Trump!” the president tweeted, though his critics quickly noted that he appeared to miss the punchline. The episode features a recurring gag in which David employs the pro-Trump accessory as a “great people repellent” in liberal Los Angeles.

Trump’s supporters have accused his critics of overreacting to the hats and, in doing so, demonstrating their own political intolerance. Some Trump supporters have been physically assaulted for wearing MAGA hats, and some restaurant owners have declined to serve anyone wearing them.

In an email, Tim Murtagh, the Trump campaign’s communications director, said: “The 1980 Olympic hockey team reminds us of a time when as a nation we came together to defeat communism. It is a shame that today’s liberals are so intolerant of other political viewpoints that they threaten to cancel such great sports heroes from our history.”

But critics said the hats, which have been worn by far-right groups and white supremacists, have made racial and ethnic minorities feel intimidated.

Alexandre Bissonnette, a Canadian man who reportedly spent hours scouring Trump’s Twitter feed, was sentenced last year to 40 years in prison for killing six Muslims in a Quebec City mosque in 2017; a photograph of him wearing a MAGA hat was found on his computer.

Last summer, Jeffrey Omari, a visiting assistant professor at Gonzaga University School of Law, wrote an essay titled, “Seeing Red: A professor coexists with ‘MAGA’ in the classroom,” in which he explained his reaction to a student wearing a Trump hat.

“I was unsure whether the student was directing a hateful message toward me or if he merely lacked decorum and was oblivious to how his hat might be interpreted by his black law professor. I presumed it was the former,” wrote Omari, who is African American. “As the student sat there directly in front of me, his shiny red MAGA hat was like a siren spewing derogatory racial obscenities at me.”

Omari said that after his piece was published in the ABA Journal, a legal trade magazine, he received so many threatening calls and emails that he stopped answering his phone and engaged campus police.

“I never anticipated the vast amounts of hate mail and threats we received,” he said.

Eruzione also expressed surprise at the outrage provoked by his appearance with Trump. A member of the president’s golf club in Jupiter, Fla., Eruzione, who said he voted for Barack Obama in 2008 and Trump in 2016, once appeared on Trump’s former reality show “Celebrity Apprentice.”

After the team took photos with him backstage in Las Vegas, Trump invited them to join him onstage. “What are you going to say?” Eruzione said. “To us it was, ‘Sure.’ ”

When he was handed the red hat, he said, “I just put it on. I wasn’t thinking. Maybe this shows I’m naive, shows I’m stupid. I don’t know. I don’t follow politics. I know he’s had some issues and said a lot of things people don’t like.”

Eruzione ruefully compared the backlash against the team with the joy in 1980 when they were hailed as heroes amid Cold War tensions. During the interview, he called up his Twitter account and began reading some of the angry tweets over the phone: “Did they have to wear those hats? . . . A shame on all of you for wearing those divisive, racist hats. . . . 40 years ago, you brought joy, but tonight it’s deep sadness.”

“I told my wife, ‘People think we are a disgrace,’ ” he said.