President Donald Trump.

The White House said Wednesday it had suspended the press credentials of a CNN reporter who engaged in a heated exchange with President Donald Trump during a briefing.

White House spokeswoman Sarah Sanders accused Jim Acosta of "placing his hands on a young woman just trying to do her job as a White House intern," referring to a staffer who tried to take the microphone away from Acosta during the fiery back-and-forth. Acosta replied on Twitter that the claim "is a lie."

He was backed up by the White House Correspondents' Association, which said the ban was "a reaction out of line to the purported offense" and encouraged those with doubts "to view the video of the events from earlier today."

Acosta, who confirmed on Twitter that he was no longer allowed in the White House, has a history of sparring with the president and CNN is often targeted by Trump. 

"When you report fake news, which CNN does, a lot, you are the enemy of the people," Trump said at the end of his exchange with Acosta. 

The president's swipe came during questioning about a caravan of Central Americans travelling north, which Trump has called an "invasion." 

Later, Acosta even managed to draw support from an unlikely corner, with prominent conservative commentator and frequent critic Ben Shapiro dismissing Sanders' accusation.

"This is not what happened," Shapiro tweeted. "No need to state something that happened that didn't."

In a statement, CNN called the president's remarks "un-American" and backed Acosta. "A free press is vital to democracy," the network said.

During the nearly 90-minute press conference, Trump also told a black reporter that she had posed "such a racist question" after she asked about whether the president referring to himself as a nationalist was emboldening white nationalism. 

"I'm simply asking the questions the public wants to know," the reporter, Yamiche Alcindor, later wrote on Twitter.