On Thursday, tensions reached new heights when Acosta walked out of the White House briefing room after press secretary Sarah Huckabee Sanders refused to answer a pointed question about whether she agreed with Trump that the press was the “enemy of the people.”

“I've addressed this question, I've addressed my personal feelings. I'm here to speak on behalf of the president. He's made his comments clear,” Sanders told Acosta during the televised briefing.

The exchange highlighted the us-versus-them mentality that has festered in the administration and in parts of the media in the 18 months since Trump took office.

Trump has been a president like no other, bending the truth as he sees fit and talking to supporters and bypassing the media with his Twitter account.

Still, he’s been a boon to the media, raising ratings for cable networks that are both supportive and critical of his actions.

Coverage of Trump has become a 24-hour affair with no precedent, as the White House constantly stirs up stories that can both feed outrage about Trump, and fuel anger among the president’s supporters over how he is treated by the press.

Trump, while sometimes offering evident frustration with the media, also has used this dynamic to his benefit, constantly complaining about “fake news” and picking fights with perceived enemies in the press.

Trump has shown no sign of pulling back or urging his supporters to lessen the hostility. And some say it’s been an effective political strategy.

“If you would have asked me two years ago, I would say it's a bad strategy and he's not going to win because in previous times it wouldn't work,” Robert Thompson, the founding director of the Bleier Center for Television and Popular Culture at Syracuse University, said of Trump’s media strategy. “But we're consistently seeing more and more people for whom that message is working.”

The rising anger has fed worries in some quarters about the possibility of attacks on the press or violence between Trump critics and supporters.

“We can’t shrug off Trump’s attacks on the press. Ever,” Dan Rather, the former CBS News anchor, wrote Thursday on Twitter. “They’re undemocratic and invite, even incite, violence. This bears repeating. It demands repeating.”

Things are likely to just get more heated with the midterm elections approaching. And after that, the nation can look forward to a divisive presidential campaign as Trump seeks reelection against a large cast of Democrats who hope to unseat him.

The stark divide between political partisans is of course nothing new.

Celinda Lake, a Democratic pollster, recalls moments in the Obama presidency, including after the black teenager Trayvon Martin was shot and killed in Florida, where cable television reflected a divided nation.

But she said things worsened during a 2016 campaign fought to a bitter end by two of the most polarizing presidential candidates in history.

“Now it’s on steroids,” Lake said.

Lake points to the ongoing Russia investigation and a never-ending stream of Trump-related news on cable networks, while Tobe Berkovitz, a professor of communication at Boston University who has worked as a political media consultant, points the finger at Trump’s strategy.

“It continues to accelerate because Trump has the perfect foil: the media,” he said. “And he continues to be overtly aggressive with his aggravation, insults and accusations of fakery.”

Trump on Thursday morning started his day by slamming CNN and MSNBC’s “Morning Joe,” arguing they were being left in the dust by Fox News, his favored network.

“Wow, @foxandfriends is blowing away the competition in the morning ratings. Morning Joe is a dead show with very few people watching and sadly Fake News CNN is doing poorly. Too much hate and inaccurately reported stories — too predictable!” he wrote in a tweet around 7 a.m.on Thursday.

The tweet fueled further anger on social media while generating more than 27,000 replies.

One Twitter user wrote: “How do I know a business not to patronize? When I walk in and see Fox News on the television.”

“You don’t like CNN because they are peeling away the layers of your lies,” another tweeted.

Lake said Trump’s attacks on the media pull his supporters together — a fact that could help him down the line.

“He thinks it’s the only way to bail himself out now and later in 2020,” Lake said. “He believes the media is totally biased against him and he believes that polarization has brought his coalition together.

Trump’s battles with the media have also encouraged cable network personalities to fight one another.

On Wednesday evening, Acosta criticized Fox News host Sean Hannity, a confidant of the president’s, in a post on Twitter.

“Hannity is a propagandist for profit, peddling lies every night. He says he’s just a talk show host, not a journalist. But he’s injecting poison into the nation’s political bloodstream warping public attitudes about the press,” Acosta tweeted. “I’m confident in the long run the truth will prevail.”

Hannity responded in kind, writing on Twitter that he was “sorry” that the CNN reporter’s “precious feelings are hurt & that people can see through your lying bullshit for what it is. Fake news.”

On Thursday, Sanders called Trump’s repeated attacks on the press “completely understandable” and called out Acosta, saying, “It’s ironic, Jim, that not only you and the media attack the president for his rhetoric when they frequently lower the level of conversation in this country.”

Susan Del Percio, a Republican strategist, said the extraordinary back-and-forth between Acosta and Sanders would just deepen fissures in the country — and that it was all a part of Trump’s strategy.

She noted how during the campaign, Trump elevated specific reporters as targets, such as MSNBC’s Katy Tur.

“What Trump has basically done is put a face to the news, whether it’s Little Katy Tur at MSNBC or Acosta at CNN and when you start calling reporters out by name, you’re able to make it personal and he’s able to give his followers a reason to dislike people and their news organizations, not just their news organizations, and that’s the difference,” Del Percio said.

And the more Trump discusses it, “the more it’s kept people in their silos. That’s for sure. And that means we’re dealing with an electorate that isn’t going to have a balanced education on issues. And that’s why some of the conspiracy theories fester like they do. They just spin around and around and around."