Sen. Jeff Flake, a Republican from Arizona who became one of the president's sharpest critics, gave a farewell address on the Senate floor on Thursday that paid tribute to his family, the people of his state and Americans around the country but also warned of the continued stress he said today's politics place on "American liberty."

"As I stand here today, I am optimistic about the future, but my optimism is due more to the country that my parents gave to me than it is due to the present condition of our civic life," said Flake, who announced that he wouldn't seek re-election in October of last year, about a year after President Donald Trump was elected.

"Let us recognize ... that the shadow of tyranny is once again enveloping parts of the globe and let us recognize, as authoritarianism reasserts itself in country after country, that we are by no means immune," Flake said.

"We, of course, are testing the institutions of American liberty in ways that none of us likely ever imagined we would – and in ways that we never should again," he said.

Flake didn't mention President Trump by name in Thursday's speech. But he has frequently criticized him for undermining U.S. institutions with his Twitter account, as he said in his speech on the Senate floor when he announced he wouldn't seek re-election, and has called for other Republicans to call out Trump's behavior. When Republicans have stayed silent, Flake has also criticized the party, telling The Arizona Republic that "there may not be a place for a Republican like me in the current Republican climate or the current Republican Party."

But Flake has also been known to vote with the president on many issues -- as often as 80 percent of the time, according to FiveThirtyEight's congressional vote tracker. Most notably, Flake voted for Supreme Court Justice Brett Kavanaugh, despite rumblings throughout the nomination process that he was a potential swing vote and a last-minute bipartisan move alongside Democratic Sen. Chris Coons to force an FBI investigation before the final confirmation vote.

Coons spoke after Flake, paying tribute to their bipartisan friendship.

"I look back fondly at our six years serving together," Coons said on the Senate floor. "I only wish I had the blessing of Senator Flake's partnership for six more years."

Senate Majority Leader Mitch McConnell also had kind words for his colleague, saying his policy contributions have "tangibly made life better for Arizonans and the nation."