As he stood on the Senate floor Thursday, Arizona Sen. Jeff Flake delivered his farewell speech in which he issued a warning that the "threats to our democracy from within and without are real."

Addressing his colleagues in Washington, Flake said "to say that our politics is not healthy is something of an understatement."

"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 said it has "been the honor of my life to represent my home, Arizona, in the United States Senate and before that, in the House of Representatives," before adding that it's been the honor of his life after being a son to his parents, husband to his wife and father to all of his kids.

"I think all of us who presume to hold these positions owe someone who loves us a debt that we can never, ever repay," Flake said talking about his wife, Cheryl. "And if they are not to be repaid then they can at least be properly recognized."

Flake said the late Sen. John McCain used to joke the only way Flake ever got elected was because of his "hundreds of siblings and thousands of cousins." Flake said with a smile, "well, the truth hurts."

"I reckon Senator McCain might have been on to something there," he said.

Flake said he was "filled with gratitude" and grateful for the love from his family and for the "privilege" of serving the country and state that "I love as well."

"I will forever cherish the work of our country that we were able to do here together," he said. "From the bottom of my heart, I thank you all."

Flake said he's leaving the Senate "grateful and optimistic." But he said his optimism comes more from the "country that my parents gave" than it does from the "present condition of our civic life."

"I believe that we all know well that this is not a normal time," Flake said, "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."

In his speech, Flake, who was elected to the U.S. Senate in 2012, looked back on the first speech he delivered in the Senate. He said he echos the same message today as he did then: "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."

"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," Flake said.

Sen. Jon Kyl, who was succeeded by Flake six years ago, said Flake "embodies what is right about the people the United States of America."

"The Senate has had some very good people over the years and currently," Kyl said, "but none have been more principled than my friend from Arizona, Jeff Flake."

Flake ended his farewell speech reminding his colleagues to not forget the words of Abraham Lincoln. 

"The way forward, he [Lincoln]  said, is “plain, peaceful, generous, just – a way which, if followed, the world will forever applaud and God will forever bless."