WASHINGTON — President Donald Trump’s use of the terms “fake news” and “enemy of the people” is “shameful” and reminiscent of words infamously used by Russian dictator Josef Stalin to describe his enemies, Republican Sen. Jeff Flake said Wednesday.

In a speech on the Senate floor, Flake, of Arizona, called Trump’s repeated attacks on the media “repulsive” and said Trump “has it precisely backward.” Despotism is the enemy of the people, while a free press is the despot’s enemy and a guardian of democracy, Flake said.

Flake, a frequent Trump critic who is retiring this year, said that when Trump calls news stories he doesn’t like “fake news,” he “should be the figure of suspicion, not the press.”

The White House had no immediate comment.

Flake has said he is not comparing Trump to Stalin, who was responsible for the deaths of millions, but said Trump’s use of a term favored by Stalin, “enemy of the people,” is chilling.

“This alone should be a source of great shame for us in this body, especially for those of us in the president’s party,'” Flake said.

Arizona’s other Republican senator, John McCain, also decried Trump’s use of the term “fake news” and said Trump was encouraging autocrats around the world “to silence reporters, undermine political opponents, stave off media scrutiny and mislead citizens.”

In an opinion column in The Washington Post, McCain said Trump’s attempts to undermine the free press “make it more difficult to hold repressive governments accountable.” Constant cries of “fake news” undercut legitimate reporting and “strip activists of one of their most powerful tools of dissent,” McCain wrote.

Trump’s first year in office “was a year which saw the truth — objective, empirical, evidence-based truth — more battered and abused than any other in the history of our country, at the hands of the most powerful figure in our government,” Flake said, referring to the president.

In a direct attack on Trump, Flake said the impulses underlying Trump’s attacks “are not benign. They have the effect of eroding trust in our vital institutions and conditioning the public to no longer trust them. The destructive effect of this kind of behavior on our democracy cannot be overstated.”

Trump’s use of the term “fake news” has encouraged authoritarian leaders around the world, who now routinely dismiss criticism as “fake news,” Flake and McCain said, citing comments by Syrian President Bashar Assad, Philippines President Rodrigo Duterte and Venezuelan President Nicolas Maduro, among others.

As a Republican, Flake said he is ashamed of Trump and said politicians in both parties must stand up to his attacks.

“No longer can we compound attacks on truth with our silent acquiescence. No longer can we turn a blind eye or a deaf ear to these assaults on our institutions,” Flake said.

He said that a president who cannot take criticism, “who must constantly deflect and distort and distract — who must find someone else to blame — is charting a very dangerous path. And a Congress that fails to act as a check on the president adds to the danger.”