WASHINGTON — News of Sen. John McCain’s death Saturday after a lengthy battle with brain cancer was greeted with sadness and fond memories from congressional colleagues, fellow veterans and even political rivals.

McCain, 81, was a Navy veteran who spent more than five years in captivity during the Vietnam War and returned home to become one of the most influential political voices of the last two decades. The longtime Republican senator from Arizona unsuccessfully ran for president twice, but was among the most well-known statesmen in America.

In recent months, numerous notable political leaders had praised McCain as a die-hard conservative who nonetheless found reasons to work towards compromise with Democrats on and off Capitol Hill. Here are a few of reactions to his passing:

Former President Barack Obama

“John McCain and I were members of different generations, came from completely different backgrounds, and competed at the highest level of politics. But we shared, for all our differences, a fidelity to something higher – the ideals for which generations of Americans and immigrants alike have fought, marched, and sacrificed.

“We saw our political battles, even, as a privilege, something noble, an opportunity to serve as stewards of those high ideals at home, and to advance them around the world. We saw this country as a place where anything is possible – and citizenship as our patriotic obligation to ensure it forever remains that way.

“Few of us have been tested the way John once was, or required to show the kind of courage that he did. But all of us can aspire to the courage to put the greater good above our own. At John’s best, he showed us what that means. And for that, we are all in his debt. Michelle and I send our most heartfelt condolences to Cindy and their family.”

Secretary of Defense Jim Mattis

"We have lost a man who steadfastly represented the best ideals of our country. As a Naval Officer and defiant prisoner of war, John McCain stood with his brothers-in-arms until they returned home together.

"Passionately committed to our country, Senator McCain always put service to the Nation before self. He recognized that for our experiment in democracy to long endure, people of action and passion must serve. In this he represented what he believed, that ‘a shared purpose does not claim our identity — on the contrary, it enlarges your sense of self.’

"His was a life well lived, one whose actions epitomized the motto of his alma mater, the U.S. Naval Academy: non sibi, sed patriae — ‘not for self, but for country.’”

Veterans of Foreign Wars National Commander B.J. Lawrence

“The senator is being remembered as a maverick at the U.S. Naval Academy, as a naval aviator, as a five and a half-year prisoner of war, and as a two-term U.S. congressman and six-term U.S. senator from Arizona.

“But we remember Senator McCain as a 32-year life member of VFW Post 7401 in Chandler, Ariz., and as a staunch supporter of a strong military as well as a champion for our troops, our veterans and their families.

“John McCain was a patriot who cared deeply about the health and well-being of those who have worn the uniform of our country and their families. On behalf of the entire VFW family, I send our deepest condolences to his family for their loss, and thank them for their strength and support that enabled him to continue serving our great nation for so many years. Bravo Zulu.”

Former Vice President Joe Biden

“John McCain’s life is proof that some truths are timeless. Character. Courage. Integrity. Honor. A life lived embodying those truths casts a long, long shadow. John McCain will cast a long shadow.

“His impact on America hasn’t ended. Not even close. It will go on for many years to come.

“John was many things — a proud graduate of the Naval Academy, a Senate colleague, a political opponent. But, to me, more than anything, John was a friend.

“America will miss John McCain. The world will miss John McCain. And I will miss him dearly.”

House Speaker Paul Ryan, R-Wis.

“This is a sad day for the United States. Our country has lost a decorated war hero and statesman. John McCain was a giant of our time — not just for the things he achieved, but for who he was and what he fought for all his life.

“John put principle before politics. He put country before self. He was one of the most courageous men of the century.

“He will always be listed among freedom’s most gallant and faithful servants. Our hearts are with his wife, Cindy, his children, and his grandchildren. This Congress, this country mourn with them.”

Senate Armed Services Committee ranking member Jack Reed, D-R.I.

“I am deeply saddened by the loss of my friend and colleague, John McCain. As a young naval aviator, he was shot down, tortured, and mistreated – but his spirit was never broken. Through a lifetime of service, he bore the scars of war, politics, and cancer, but never gave in to despair.

“He was strengthened by trials and ordeals that would have overcome lesser men. And I think some of his darkest, most difficult experiences gave him an even greater love for our democracy and American values.

“America lost a true patriot and one of the most unique, hard-charging legislators in modern American history. I have lost a colleague I am proud to call my friend and Chairman. I will miss his good-natured jabs at West Point, his fierce independence, and wise counsel.

“At a time when divisiveness is too often deployed for short-term political gain, John valued patriotism over partisanship. He understood the importance of working together – and that by moving forward together we can achieve lasting progress.”

Sen. Jerry Moran, R-Kan.

“There has been no better advocate for our servicemembers and veterans than John and it was an honor to work closely with him on achieving the most significant VA reform Congress has passed in decades with the VA MISSION Act. This could not have been possible without his leadership and knowledge, and it was fitting that the bill was named after him.

“John was a friend and an example to me and many others. He leaves behind a legacy of courage and conviction – I hope we all can reflect on these values as we work together to heal and advance America.

“Robba and I are praying for John’s wife, Cindy, their children and grandchildren, as well as John’s mother, and we thank them for sharing John with us for so many years.”