Republican politicians joined reporters on Sunday in defending the news media against President Trump’s claim that the Fourth Estate is “the enemy of the American people.”

From Sen. John McCain to Trump’s own defense secretary, James “Mad Dog” Mattis, and the famed Woodward-Bernstein reporting duo, politicians and media heavyweights blasted Trump’s Friday tweet in which he demonized much of the mainstream media.

White House correspondent Jonathan Karl said on ABC’s “This Week” that reporters would continue to do their jobs even if it means “incurring the wrath of the most powerful person in the world.”

“I’ve seen my colleagues risk their lives and, with increasing frequency, lose their lives in their pursuit of the truth,” Karl said in a closing essay that noted the historically contentious relationship between the White House and the press.

“We are not about to stop doing our jobs because yet another president is unhappy,” he said. “A free press isn’t the enemy of America — it’s a big part of what makes America great.”

McCain (R-Ariz.) told NBC’s “Meet the Press,” “When you look at history, the first thing that dictators do is shut down the press. And I’m not saying that President Trump is trying to be a dictator. I’m just saying we need to learn the lessons of history.”

Mattis — a retired Marine Corps general — told reporters traveling to Abu Dhabi on Sunday that he didn’t see the media as the enemy.

While there have been “some rather contentious times with the press,” Mattis said, “I don’t have any issues with the press myself.”

Carl Bernstein, half of the reporting team that exposed the Watergate scandal, said Trump’s assault on the press was “more treacherous” than President Richard Nixon’s private attacks — and hearkened back to “dictators and authoritarians, including Stalin, including Hitler.”

While Bernstein immediately added that he wasn’t comparing Trump to the Nazi leader, he called Trump “an enemy of the truth” on CNN’s “Reliable Sources.”

His former partner Bob Woodward offered a measured response and praised most of the reporting on Trump as “quite good.”

“I know Trump a little bit. I don’t think he really believes that the press is the enemy of the people, frankly. And we have to do our reporting in a very aggressive, careful way,” he told CBS’ “Face the Nation.”

Meanwhile, three of Trump’s former GOP primary opponents Sunday all took the rare step of defending the mainstream media.

“If someone tries to put limits on the press, I’ll be the first one standing up for the right of press,” Sen. Rand Paul (R-Ky.) told “This Week.”

Ohio Gov. John Kasich told CNN’s “State of the Union” that the press is “vital” and “such an important part of democracy.”

Sen. Lindsey Graham (R-SC) said that while the press was becoming “over the top” and “acting more like an opposition party,” the real enemies of the American people are Russia, Iran and radical Islam.

“The backbone of democracy is a free press and an independent judiciary. And they are worth fighting and dying for,” Graham told “Face the Nation.”