Two Republican U.S. senators have assailed President Donald Trump for his constant attacks on critical stories about his presidency, saying they undermine a basic tenet of democratic societies, a free and open news media.

Senator Jeff Flake, a frequent Trump critic from the western state of Arizona, said in a Senate speech Wednesday that Trump's disparagement of the media is similar to that of former Soviet dictator Joseph Stalin. He said Trump's "assault" on the media is "unprecedented" and "unwarranted."

Sen. Jeff Flake Cites President Kennedy on VOA to Argue for Free Press

"It is a testament to the condition of our democracy that our own president uses words infamously spoken by Josef Stalin to describe his enemies," Flake said in a reference to a tweet last February in which Trump declared major U.S. news outlets to be the "enemy of the American People."

"It bears noting that so fraught with malice was that phrase 'enemy of the people,' that even [Stalin's successor] Nikita Khruschev forbade its use," Flake said.

"Despotism is the enemy of the people. The free press is the despot’s enemy, which makes the free press the guardian of democracy. When a figure in power reflectively calls any press that doesn’t suit him ‘fake news’ it is that person who should be the figure of suspicion, not the press," Flake added.

In an opinion article in The Washington Post, Senator John McCain from Arizona, the Republican party's 2008 presidential candidate, said that Trump's frequent claims of "fake news" about stories he does not like "are being closely watched by foreign leaders who are already using his words as cover as they silence and shutter one of the key pillars of democracy."

The attacks on Trump's complaints about news coverage a year into his presidency came the same day the one-time reality television entertainer announced what he called "THE MOST DISHONEST & CORRUPT MEDIA AWARDS OF THE YEAR."

Trump did not respond directly to McCain's and Flake's statements. But White House spokesman Sarah Sanders said Flake was "looking for some attention" because of "terrible poll numbers" that led him to decide to not run for re-election later this year.

The president regularly lashes out against individual journalists and media outlets he thinks treat him unfairly, while praising those that give him positive media coverage.

A billboard late-night talk show host Stephen Colbert is seen near New York's Times Square, January 16, 2018. Colbert is jokingly campaigning for President Trump's "fake news awards."

Flake said a president like Trump who "never accepts blame ... is charting a very dangerous path." Flake attacked Trump for calling investigations into Russian meddling in the 2016 U.S. presidential election a "hoax" perpetrated by Democrats to explain his upset victory over Democrat Hillary Clinton when the interference actually occurred.

McCain, in his newspaper op-ed piece, said, Trump's "attempts to undermine the free press ... make it more difficult to hold repressive governments accountable. For decades, dissidents and human rights advocates have relied on independent investigations into government corruption to further their fight for freedom. But constant cries of 'fake news' undercut this type of reporting and strip activists of one of their most powerful tools of dissent.

"This assault on journalism and free speech proceeds apace in places such as Russia, Turkey, China, Egypt, Venezuela and many others," McCain said. "Yet even more troubling is the growing number of attacks on press freedom in traditionally free and open societies, where censorship in the name of national security is becoming more common. Britain passed a surveillance law that experts warn chills free speech, and countries from France to Germany are looking to do the same. In Malta, a prominent journalist was brutally murdered in October after uncovering systemic government corruption. In Poland, an independent news outlet was fined (later rescinded) nearly half a million dollars for broadcasting images of an anti-government protest.

WATCH: Trump's Rhetoric Compared to Stalin's by a Senator of His Own Party

"Unfortunately, the Trump administration’s attitude toward such behavior has been inconsistent at best and hypocritical at worst," he said. "While administration officials often condemn violence against reporters abroad, Trump continues his unrelenting attacks on the integrity of American journalists and news outlets. This has provided cover for repressive regimes to follow suit. The phrase 'fake news' — granted legitimacy by an American president — is being used by autocrats to silence reporters, undermine political opponents, stave off media scrutiny and mislead citizens."