Retiring GOP Sen. Jeff Flake, in a farewell speech to the Senate, warned on Thursday of the dangers facing democracies.

"Let us recognize from this place here today that the shadow of tyranny is once again enveloping parts of the globe," the Arizona Republican said. "And let us recognize as authoritarianism reasserts itself in country after country that we are by no means immune."

The embattled lawmaker announced his retirement last year after polling showed he faced long odds to re-election. The senator's frequent comments denouncing President Donald Trump soured his reputation among the Republican base but did not earn him many fans among centrists or the left.

Flake on Thursday returned to the themes he emphasized in 2017 when he announced he would not seek another term. Again, Flake seemed to criticize Trump without mentioning him directly by name.

"My colleagues, to say that our politics is not healthy is something of an understatement," Flake said. "I believe that we all know well that this is not a normal time, that the threats to our democracy from within and without are real, and none of us can say with confidence how the situation that we now find ourselves in will turn out."

Flake said his thoughts recently had turned to democracy, "where it comes from, and how, if the circumstances were right, it might slip away."

He recalled his former work for the Foundation for Democracy in the 1990s, when he was a monitor of Namibia's burgeoning independence process. He said he was reminded of the speech that Vaclav Havel, the playwright and last president of Czechoslovakia, had delivered before the U.S. Congress in February 1990.

"Havel's awed appreciation for the values that too many of us might take for granted bought home to me, an American in my mid-20s sitting there in Africa, the power of the American example to the whole world," Flake said.

He said that Havel "called out to the whole world from Washington that day" in a graceful rebuke of the "mistaken prophecy" that liberal democracy had triumphed permanently.

"Civilization and the victories of freedom — history itself — are not a matter of once achieved, always safe," Flake said. "Vaclav Havel lived this."

Flake said he could not help but look back on the first speech he gave from the Senate floor six years ago.

"I noted then and echo today that serious challenges lie ahead, but any honest reckoning of our history and our prospects will note that we have confronted and survived more daunting challenges than we now face," Flake said.

"Ours is a durable, resilient system of government, designed to withstand the foibles of those who from time to time occupy this place, including yours truly."