WASHINGTON — White House Press Secretary Sarah Huckabee Sanders refused to say whether she agrees with President Donald Trump’s attacks on the media as the “enemy of the people,” getting into a protracted exchange with CNN’s Jim Acosta over what she believes are unfair attacks coming from news outlets.

The conversation lasted for about three minutes at Thursday’s press briefing, and was fueled by Ivanka Trump’s remarks earlier in the day in which she said she does not believe that the media is the enemy.

When first asked about Ivanka Trump’s comments, Sanders instead shifted the focus to what she said were personal attacks directed at Trump and members of the administration, including her.

Trump tweeted support for his daughter on Thursday. “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!”

Acosta, who is CNN’s White House correspondent, later returned to the topic.

“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 say that the press is not the enemy of the people,” he pressed. “I think we deserve that.”

But Sanders said it was “ironic” 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,” she said.

She cited remarks made on CNN, as well as the White House Correspondents’ Association Dinner.

Sanders attended that event, held in late April. The chosen entertainer, Michelle Wolf, launched into an extended rant about Sanders and other members of the administration, to the point where a number of White House correspondents said it made them uncomfortable and that Sanders deserved an apology.

“You brought a comedian up to attack my appearance, and called me a traitor to my own gender,” Sanders said.

She added, “as far as I know, I am the first press secretary in the history of the United States that has required Secret Service protection.”

Acosta responded, “I am sorry that happened to you. I wish that had not happened.” But he told Sanders that “the president of the United States should not refer to us as the enemy of the American people.”

Acosta reported from Trump’s rally in Tampa, Fla., on Tuesday, and posted video of Trump supporters shouting obscenities and “CNN sucks” as he did his live shot from the scene.

Acosta said on Twitter afterward, “I walked out of the end of that briefing because I am totally saddened by what just happened. Sarah Sanders was repeatedly given a chance to say the press is not the enemy and she wouldn’t do it. Shameful.”

He said on CNN, “I’m tired of this, honestly…It is not right. It is not fair. It is not just. It is un-American to come out here and call the press the enemy of the people, and Ivanka Trump knows that. I don’t know why her father doesn’t, and I don’t know why this press secretary doesn’t.”