In a heated exchange with a CNN reporter, White House press secretary Sarah Sanders refused to say reporters are not the "enemy of the people," as the president has said.

President Trump has explicitly labeled the media as the enemy of the people and has railed against CNN in particular. At a recent Trump rally in Florida, crowds booed and heckled CNN's Jim Acosta, who was there to cover the event. The president also endorsed the crowd's reaction by retweeting videos of his supporters jeering Acosta.

Acosta later tweeted, "I’m very worried that the hostility whipped up by Trump and some in conservative media will result in somebody getting hurt. We should not treat our fellow Americans this way. The press is not the enemy."

On Thursday, Ivanka Trump said in an interview that she does not think the media is the enemy of the people, even though she believes there has been a fair share of inaccurate reporting about her.

Trump later tweeted, "They asked my daughter Ivanka whether or not the media is the enemy of the people. She correctly said no. It is the FAKE NEWS, which is a large percentage of the media, that is the enemy of the people!"

During Thursday's White House briefing, Acosta pressed Sanders to publicly state that the media is not the enemy of the people.

BuzzFeed News / the White House

In response, Sanders — who appeared to be prepared for a showdown — read off a list of accusations against the media for "personally" attacking her "on a number of occasions."

BuzzFeed News / the White House

"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," Sanders said.

CNN

"The media has attacked me personally on a number of occasions, including your own network said I should be harassed as a life sentence, that I should be choked," Sanders added.

However, she appeared to be referring to MSNBC anchor Nicolle Wallace, who in May asked NBC News White House reporter Kristen Welker, "How do you resist the temptation to run up and wring her neck?"

Wallace later apologized for the comment.

Sanders then accused the media for inviting comedian Michelle Wolf to the annual White House Correspondents' Dinner. "You brought a comedian up to attack my appearance and call me a traitor to my own gender," Sanders said.

Nurphoto / Getty Images

"As far as I know, I'm the first press secretary in the history of the United States that's required Secret Service protection," Sanders said.

BuzzFeed News / the White House

Acosta once again pressed Sanders to acknowledge that the media is not the enemy of the people "for the sake of this room, the people who are in this room, this democracy, this country..."

Here's the full exchange:

ACOSTA: I want to follow up on Sara's question from NPR. She asked you about Ivanka Trump's statement that the press is not the enemy of the people. She asked you whether or not the press is the enemy of the people. You read off a laundry list of your concerns about the press and then things that you feel were misreported but you did not say that the press is not the enemy of the people.

I think it would be a good thing if you were to state right here at this briefing that the press, the people who are gathered in this room right now, doing their jobs every day, asking questions of officials like the ones you brought forward earlier, are not the enemy of the people. I think we deserve that.

SANDERS: The president has made his position known. I also think it's ironic — I'm trying to answer your question. I politely waited and I even called on you even after you interrupted me when I called on your colleague.

*cross-talk*

SANDERS: 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. Repeatedly, repeatedly the media resorts to personal attacks without any content other than to incite anger. The media has attacked me personally on a number of occasions including your own network said I should be harassed as a life sentence, that I should be choked.

ICE officials are not welcomed in their place of worship and their personal information is shared on the internet. When I was hosted by the White House Correspondents' Association — of which nearly all of you are members of — you brought a comedian up to attack my appearance and call me a traitor to my own gender.

In fact, as far as I know I'm the first press secretary in the history of the United States that's required secret service protection. The media continues to ratchet up the verbal assault against the president and everyone in this administration and certainly we have a role to play, but the media has a role to play for the discourse in this country as well.

ACOSTA: If I may follow up. You did not say in the course of those remarks that you just made, that the press is not the enemy of the people. Are we to take it from what you just said — we all get put through the wringer, we all get put in the meat grinder in this town and you're no exception and I'm sorry that that happened to you. I wish that that had not happened. For the sake of this room, the people who are in this room, this democracy, this country... all the people around the world are watching what you are saying Sarah, and the White House... for the United States of America, the president of the United States should not refer to us as the enemy of the people. His own daughter acknowledges that and all I'm asking you to do Sarah, is to acknowledge that right here and right now.