Mr. Trump is seldom at a loss for motives in picking a public fight, and conflict seems to soothe him in the way that it unnerves others. He loved getting a rise from the players and owners who linked arms in solidarity before Sunday’s slate of football games, aides and associates said. His satisfaction was blighted only by the disapproval expressed by his friend Robert Kraft, the owner of the New England Patriots.
The president’s provocations are a real-time expression of his emotions in the moment and his feel for a crowd. More than anything, such fights are a reflection of his focus on what it takes to keep his restive populist base behind him, and a ritual of self-preservation intended to divert attention from other, more damaging narratives.
But this time, Mr. Trump, who tends to lash out when attacked, seemed to make his comments during comparative quiescence, with majorities of Americans approving of his response to the recent hurricanes and a stopgap budget deal with Democrats that took leaders in his party by surprise.
But White House officials say the president is deeply worried that his recent show of bipartisanship on the budget and on the Deferred Action on Childhood Arrivals immigration program with two Democratic leaders — Representative Nancy Pelosi and Senator Chuck Schumer — endangers his standing with the base.
Mr. Trump, according to the officials, believes his decision to back Luther Strange — a struggling establishment conservative in the Alabama Senate race and the reason Mr. Trump went to Alabama — makes him appear weak. He has repeatedly expressed unhappiness with his political team for persuading him to back Mr. Strange, who has drawn opposition from many of Mr. Trump’s supporters, including Stephen K. Bannon, Mr. Trump’s former chief strategist, and not his opponent, Roy Moore, a former judge.
For those reasons, Mr. Trump leaned right harder than usual on Friday night. He chided Senator John McCain, Republican of Arizona, for opposing his latest attempt to repeal the Affordable Care Act, and he ridiculed North Korea’s leader, Kim Jong-un, as the “Little Rocket Man.” He also offered the most tempered of support for his purported ally, Mr. Strange — “Big Luther” to the president.
But his most conspicuous targets were the highly paid athletes, most of them black, who during the playing of the national anthem at football games have protested police brutality and what they say is the systematic racism behind it. The vehemence was tactical, but also visceral. Mr. Trump has often taken a dim view of race-based protest and, as the onetime owner of a football franchise in a failed start-up league, he believes owners of sports teams should control their employees.
His top staff was not nearly as enthusiastic, a senior administration official said. There were complaints from some officials that his tweets created another public relations headache at a time when the White House was scrambling to deal with a looming loss on health care, a dangerous escalation in the war of words with North Korea and complicated negotiations over the centerpiece of the president’s legislative agenda, tax reform.
But John F. Kelly, the White House chief of staff, dismissed such complaints, telling other aides he fully supported the president’s move and that there was no good time for such a conversation.
“Every American should take the three minutes or so that it takes for the national anthem to play to stand up, remove their hat, put their hand over their heart and think about the men and women that have been named, sacrificing their lives, so that song can be played in the stadium,” Mr. Kelly, a former four-star Marine general, said in a statement late Monday.
“After that happens, folks should feel free to do whatever they want to do to express their opinions.”
Mr. Trump, posting on Twitter on Monday evening, said that claims that Mr. Kelly had opposed his attack were a “total lie!”
Still, it was a reprise of a formula the president used repeatedly during the 2016 presidential campaign — digging in on one side of an inflammatory issue amid praise from conservatives, and enjoying the spectacle of his critics condemning him.
“He intuitively understands that making compromise with the Democrats is sort of the opposite of what he told his base he was going to do,” said Alex Conant, a veteran Republican consultant who was part of Senator Marco Rubio’s campaign team in 2016.
“It’s not a coincidence that the same week he did the DACA deal that he just flooded Twitter with a bunch of red meat for the base,” Mr. Conant added. “I think his fundamental problem is he needs to figure out ways to grow his base, and his instinct is instead to double down on what he’s already got. Whenever he tacks to the middle, his numbers tick up. But he just can’t bring himself to move beyond his base.”
That is not how Mr. Trump sees it.
In private, the president and his top aides freely admit that he is engaged in a culture war on behalf of his white, working-class base, a New York billionaire waging war against “politically correct” coastal elites on behalf of his supporters in the South and in the Midwest. He believes the war was foisted upon him by former President Barack Obama and other Democrats — and he is determined to win, current and former aides said.
After his criticism of athletes over the weekend, Mr. Trump made a point of praising Nascar drivers early Monday morning after the national anthem at a race on Sunday went off without protest.
In another tweet on Monday morning, Mr. Trump repeated his assertion that his position about protesting the national anthem was about patriotism.
“The issue of kneeling has nothing to do with race,” he said. “It is about respect for our Country, Flag and National Anthem. NFL must respect this!”
Mr. Trump’s football tweets came just before a Monday evening dinner at the White House with several Christian evangelical leaders, conservative activists from the Koch political network and Leonard A. Leo, the executive vice president of the Federalist Society.
Mr. Trump at one point asked those in attendance if evangelical voters were aware of what he has done in office, citing their support in the campaign, according to an attendee.
Some at the dinner praised his criticism of the N.F.L., and the president replied that his remarks had “caught on.”