The question hung over the Golden State Warriors from the moment they won the NBA championship: Would they celebrate with President Trump at the White House? The issue exploded Saturday when Trump, facing the prospect of being shunned, told the team members — and Stephen Curry specifically — that they weren’t invited.

“Not surprised,” Warriors coach Steve Kerr said. “He was going to break up with us before we could break up with him.”

The incident sparked quick reaction from local players.

Bruce Maxwell, a rookie catcher for the Oakland A’s, took a knee during the National Anthem before the game in Oakland Saturday, making him the first Major League Baseball player to do so.

Also Saturday, Oakland Raiders punter Marquette King posted a picture of himself on his Instagram page standing in front of the White House and holding a handmade sign that read, “Looks like this ‘son of a bitch’ revoked my invitation too! @StephenCurry30,” referencing Trump’s remarks.

The Raiders are in Washington ahead of their game with the Redskins on Sunday.

The episode, which amplified an already raging national firestorm over sports, race and politics, came just hours after the president, speaking to an applauding crowd at an Alabama political rally, lambasted players who, like former 49ers quarterback Colin Kaepernick, decided to kneel during the national anthem to protest police killings and racial injustice.

Suddenly, the Warriors, who had already made the White House aware that they had planned to meet before their first practice of training camp Saturday morning to discuss a potential invite from the Trump administration, found themselves in the middle of it.

“Going to the White House is considered a great honor for a championship team. Stephen Curry is hesitating, therefore invitation is withdrawn!” Trump tweeted shortly before 6 a.m. PDT, using his Twitter account to take aim at the Warriors star.

The team itself later released a statement that the players accepted that they were not invited and that they were “disappointed” they did not have the chance to open a dialogue on issues “impacting our communities that we felt would be important to raise.”

Instead of visiting the White House during their late-February trip to Washington to play the Wizards, the Warriors said they will do something to “celebrate equality, diversity and inclusion — the values we embrace as an organization.” ESPN’s The Undefeated reported that the team is considering visiting the Smithsonian National Museum of African American History and Culture.

“It’s kind of funny that tweet was sent before we had a chance to get together as a team,” Curry said Saturday afternoon. “It is what it is. My stance is the same as it was yesterday, and even kind of cemented even further about how things in our country have gone in terms of him representing us in a very damaging way.”

Athletes have long taken political stands — even by not coming to the White House — but presidents generally refrained from getting involved, said Julian Zelizer, a presidential historian and professor of history and public affairs at Princeton University.

“This is yet another moment where the president spends time in ways other administrations have not,” he said.

Trump’s comments came during yet another politically fraught moment in his administration, with the president facing a likely legislative loss on health care and lingering concerns from his base of conservative supporters over a potential deal with Democrats on immigration.

“This is a pattern here that at key moments the president plays to his base through controversial statements like this,” Zelizer said. He cited Trump’s controversial speech after the slaying of a protester at a white nationalist rally in Charlottesville, Va., last month and a summer of legislative failures as an example.

“The go-to for him, both in the campaign and even as president, is to dive into some of these controversial areas, including the politics of race,” he said. “There have been many athletes and actresses (who have criticized Trump), but he’s just decided to ... go after two high-profile African American athletes.”

That fact wasn’t lost on Curry, who said he didn’t see why Trump “feels the need to target certain individuals rather than others. I have an idea of why, but it’s kind of beneath a leader of a country to go that route. That’s not what leaders do.”

Trump’s tweet came the morning after he slammed NFL players who kneel during the national anthem, a practice started last season by Kaepernick.

“Wouldn’t you love to see one of these NFL owners, when somebody disrespects our flag, you’d say, ‘Get that son of a bitch off the field right now. Out! He’s fired,’” Trump said at the Friday night rally in support of Sen. Luther Strange of Alabama. On Saturday morning, Trump took to Twitter to reiterate that view, saying that if professional athletes wanted to be paid millions of dollars they should not be allowed to “disrespect” the flag.

“If not, YOU’RE FIRED. Find something else to do!” Trump tweeted.

Early Sunday, the president didn’t back down.

“If NFL fans refuse to go to games until players stop disrespecting our Flag & Country, you will see change take place fast,” Trump wrote in a tweet. “Fire or suspend!”

The president’s words drew condemnation from players, owners, the NFL players union and the league itself. NFL Commissioner Roger Goodell responded Saturday, saying that Trump’s comments were “divisive” and show a “lack of respect” for the NFL.

Jed York, owner of the 49ers, released a pointed critique of the president Saturday afternoon.

“The callous and offensive comments made by the president are contradictory to what this great country stands for. Our players have exercised their rights as United States citizens in order to spark conversation and action to address social injustice,” York said. “We will continue to support them in their peaceful pursuit of positive change in our country and around the world.”

High-profile players from both the NFL and the NBA responded to Trump with a flurry of condemnations. A call to kneel during the national anthem at Sunday’s lineup of NFL games spread through social media, while some players said the comments only validated Kaepernick’s initial decision to protest.

“With everything that’s going on in our country, why are YOU focused on who’s kneeling and visiting the White House??? #StayInYoLane,” tweeted Houston Rockets guard Chris Paul, president of the league’s players union. Later Saturday, Lebron James, star forward for the Cleveland Cavaliers and a Warriors rival, released a video comment on the president’s remarks.

Trump is “now using sports as the platform to try to divide us,” James said. “For him to try to use this platform to divide us even more is not something I can stand for, and it’s not something I can be quiet about.”

In many ways, it appeared Trump’s comments were only the latest sign of an apparent rebirth of politically active and vocal athletes, experts said. For decades, many had wondered what had happened to athletes’ activism of times past — including those who were vocal during the civil rights movement, said Jeremi Duru, a professor of sports law at American University’s law school in Washington.

“Well, this decade has shown that activist athletes are back,” he said, “and Trump’s attacks on them are only emboldening them to stand stronger and taller and with greater unity.”

Hamed Aleaziz and Connor Letourneau are San Francisco Chronicle staff writers. Email: haleaziz@sfchronicle.com, cletourneau@sfchronicle.com Twitter: @haleaziz, @Con-Chron