“U bum @StephenCurry30 already said he ain’t going! So therefore ain’t no invite. Going to White House was a great honor until you showed up!” Mr. James wrote on Twitter, where he has nearly twice as many followers as the president.
Mr. James later elaborated in a video on Instagram.
Mr. Trump also drew an unusually strong rebuke from the commissioner of the N.F.L., whose owners include many donors to, and friends of, the president. Mr. Trump made the commissioner, Roger Goodell, a foil, accusing him of stoking disrespect for the country by defending players who protest the anthem.
The Warriors, who play in a league that sometimes promotes social issues and whose owners and players have been known to denounce the president, said in a statement they would use a visit to Washington in February to highlight issues of diversity and inclusiveness.
By midafternoon, a spokesman for the University of North Carolina national championship basketball team confirmed the team would not be going to the White House, but he said it was a scheduling conflict, not a response to the day’s back-and-forth.
Many athletes have been moved to comment on race and social justice more frequently in the past year after a series of police shootings of unarmed African-Americans and the support Mr. Trump has received from white supremacists.
Last year, Colin Kaepernick, then a quarterback for the San Francisco 49ers, began kneeling during the playing of the national anthem, to highlight, he has said, police brutality and racial injustice. He left the team this season and has not worked since, inspiring debate over whether teams are punishing him, while many players have knelt or made gestures in support of him during the anthem.
At the same time, some owners of N.F.L. teams have suggested that players should not take part in…