President Trump is ratcheting up a contentious dispute with two of America's most popular professional sports leagues, opening a new front in a culture war over free speech and First Amendment rights.

Mr. Trump angered many NFL players and fans when he said at a rally in Alabama on Friday that athletes who refuse to stand for the national anthem should be fired. Former 49ers quarterback Colin Kaepernick began kneeling during the national anthem in 2016 to protest racism and police violence against minorities.

"Wouldn't you love to see one of these NFL owners, when somebody disrespects our flag, you'd say, 'Get that son of a b---- off the field right now. Out! He's fired," Mr. Trump said to loud applause.

Get Breaking News Delivered to Your Inbox

Mr. Trump brought the NBA into the fray Saturday morning when he rescinded an invitation for the Golden State Warriors' star Stephen Curry to visit the White House with the championship team. NBA players rallied around Curry, with LeBron James calling the president a "bum" in a tweet that's been retweeted hundreds of thousands of times.

On Saturday afternoon, Mr. Trump continued the barrage in a pair of tweets, writing players "making millions of dollars in the NFL" should "find something else to do" if they refuse to stand during "The Star-Spangled Banner."

If a player wants the privilege of making millions of dollars in the NFL,or other leagues, he or she should not be allowed to disrespect.... — Donald J. Trump (@realDonaldTrump) September 23, 2017

...our Great American Flag (or Country) and should stand for the National Anthem. If not, YOU'RE FIRED. Find something else to do! — Donald J. Trump (@realDonaldTrump) September 23, 2017

In a statement Saturday afternoon, the Golden State Warriors said they would not be visiting the White House and "accept that President Trump has made it clear that we are not invited."

"We believe there is nothing more American than our citizens having the right to express themselves freely on matters important to them," the team wrote. "We're disappointed that we did not have an opportunity during this process to share our views or have open dialogue on issues impacting our communities that we felt would be important to raise."

The team said it plans to "constructively use our trip to the nation's capital in February to celebrate equality. diversity and inclusion -- the values that we embrace as an organization."

The president's campaign against protesting NFL players spurred NFL Commissioner Roger Goodell to issue a statement defending the players.

"Divisive comments like these demonstrate an unfortunate lack of respect for the NFL, our great game and all of our players, and a failure to understand the overwhelming force for good our clubs and players represent in our communities," Goodell said.