Rep. Eric Swalwell, D-Calif., introduced legislation Monday that would make certain attacks on journalists a federal crime, and said the bill is needed to counter the "climate of extreme hostility to the press" created by President Trump.

"President Donald Trump's campaign and administration have created a toxic atmosphere," Swalwell said. "It's not just about labelling reports of his constant falsehoods as #FakeNews – it’s his casting of media personalities and outlets as anti-American targets, and encouraging people to engage in violence."

Swalwell also criticized Trump for calling some news outlets a "stain on America" and the "enemy of the American people."

The Journalist Protection Act would make it a federal crime to intentionally cause bodily harm to a journalist while he or she is reporting, or to intimidate him or her from newsgathering activities.

He cited data from the Communications Workers of America that said at least 44 reporters were physically attacked in the United States in 2017. "We must send a loud, clear message that such violence won’t be tolerated," he said.

Trump has often been critical of various news organizations, calling CNN and the New York Times “fake news.”