John McCain was a U.S. senator for more than three decades. Before that, he was a congressman. And during his tenure in the Senate, he became the Republican nominee for president.

McCain died Saturday at age 81 after suffering from glioblastoma, an aggressive brain tumor.

Before McCain was a politican, he served in the U.S. Navy in the Vietnam War. He was a prisoner of war for more than five years and suffered lasting injuries, including to his arms and right leg.

Here's a look at some things McCain accomplished throughout his lengthy political career.

Liaison to the Senate – late 1970s

While McCain's job as a liaison to the Senate was supposedly more of a "glorified valet," according to the Los Angeles Times, the Navy veteran turned the position into what the newspaper called "an apprenticeship" that would help launch his political career.

McCain in the House – 1982

The Arizonan won his first campaign in November 1982 when he was elected to the U.S. House of Representatives.

McCain had moved to Arizona in 1982.

He was re-elected to the House in 1984.

Striking gold in the Senate – 1986

McCain replaced longtime Republican Sen. Barry Goldwater in the Senate in a 1986 election.

He would continuously be re-elected to the Senate until his death.

Keating Five scandal – 1989

The Keating Five scandal refers to a group of senators who were accused of meeting with federal banking regulators on behalf of financier Charles Keating Jr.

Aside from McCain, the Keating Five included: Sens. Alan Cranston, D-Calif., Dennis DeConcini, D-Ariz., John Glenn, D-Ohio, and Donald Riegle, D-Mich.

The five senators allegedly attempted to pressure federal regulators on behalf of Keating – who was a massive campaign contributor to the five and would eventually spend time in prison for fraud related to his Lincoln Savings and Loan Association. The FBI and Senate Ethics Committee investigated.

McCain was given a mild rebuke for his involvement in the scandal. At the time of his death, McCain was the only one of the five still serving in the U.S. Senate.

Vietnam – 1990s

McCain is credited with being instrumental in helping to revive a diplomatic relationship between the U.S. and Vietnam. He also praised former President Bill Clinton for restoring that tie in 1995.

“Human rights progress in Vietnam should also be better served by restoring relations with that country,” McCain said in a 1995 statement. “The Vietnamese have already developed complex relations with the rest of the free world. Instead of vainly trying to isolate Vietnam, the United States should test the proposition that greater exposure to Americans will render Vietnam more susceptible to the influence of our values.”

Veterans Hospice Benefit Act – 1991

McCain sponsored the Veterans Hospice Benefit Act in 1991 that, in part, created a pilot program that provided hospice care for terminally ill veterans.

Agent Orange Act – 1991

McCain co-sponsored the Agent Orange Act in 1991 – legislation that affirmed certain diseases suffered by veterans could be the result of harmful chemical exposure related to their service. That recognition would make those veterans eligible for specific benefits.

Following McCain’s brain cancer diagnosis, there was speculation his illness could be related to chemicals he came into contact with while in Vietnam.

Chairman of the Commerce Committee – 1997

McCain would serve as chairman of the Senate Committee on Commerce, Science & Transportation from 1997 until 2001. He would also resume the role from 2003 to 2005.

The committee handles issues such as: aviation, communications, transportation security, fisheries, disasters, space, tourism, consumer issues and product safety, among many other things.

An influential person – 1997

TIME magazine named McCain one of the “25 Most Influential People in America” in 1997.

McCain for President, Part 1 – 1999

In Nashua, N.H., McCain officially announced his candidacy for the Republican nomination for president on Sept. 27, 1999.

“I don’t begin this mission with any sense of entitlement. America doesn’t owe me anything,” McCain said. “I am the son and grandson of Navy admirals, and I was born into America’s service. It wasn’t until I was deprived of her company that I fell in love with America, and it has been my honor to serve her and her great cause of freedom.”

“It is because I owe America more than she has ever owed me that I am a candidate for president of the United States,” he said.

Endorsement of George W. Bush – 2000

McCain would eventually endorse eventual President George W. Bush, but the two didn’t see eye-to-eye on issues, according to reports at the time.

Bush said McCain as his primary opponent made him “a better candidate.”

McCain takes on campaign finance reform – 2002

Along with then-Sen. Russ Feingold, D-Wis., McCain introduced the Bipartisan Campaign Reform Act – or the McCain-Feingold Act. The legislation enacted regulations of political campaign financing, particularly with soft money contributions.

Chairman of the Indian Affairs Committee – 2005

McCain served as the chairman of the Indian Affairs Committee from 2005 to 2006.

McCain’s gang – 2005

McCain was part of the so-called “Gang of 14” – a group of senators who worked together to end a kerfuffle over judicial nominations.

Aside from McCain, the group included: Sens. Robert Byrd, D-W.Va.; Lincoln Chaffee R-R.I.; Susan Collins, R-Maine; Mike DeWine, R-Ohio; Lindsey Graham, R-S.C.; Daniel Inouye, D-Hawaii; Mary Landrieu, D-La.; Joe Lieberman, D-Conn.; Ben Nelson, D-Neb.; Mark Pryor, D-Ark.; Ken Salazar, D-Colo.; Olympia Snowe, R-Maine; and John Warner, R-Va.

Only Graham and Collins remain in the Senate today.

McCain and Kennedy take on immigration

Along with the late Sen. Ted Kennedy, D-Mass., McCain pushed for immigration reform that would include, among other things, a pathway to citizenship for some undocumented immigrants.

The bill also called for Mexico to crack down on its own border security and take steps to combat immigrant smugglers, the Washington Times reported then.

In 2006, McCain and Kennedy signed onto another immigration reform bill that would make it out of the Senate. This bill, too, would call for a strengthening of the U.S. border with Mexico and provide a pathway to citizenship for certain undocumented immigrants.

McCain for President, Part 2 – 2007

After teasing his announcement on news programs, McCain officially announced – again from New Hampshire – that he was putting his hat in the ring for the presidency.

Picking Palin – 2008

Surprising many, McCain picked then-Alaska Gov. Sarah Palin as his running mate.

“She’s not from these parts, and she’s not from Washington, but when you get to know her, you’re going to be as impressed as I am,” McCain said then.

Obama for President – 2008

McCain lost the presidency to Barack Obama, a senator from Illinois. Joe Biden – who is a friend of McCain’s – was Obama’s running mate.

Another gang – 2013

McCain was part of the bipartisan so-called “Gang of Eight” senators who came up with a comprehensive immigration reform bill in 2013.

Aside from McCain, the group included: Sens. Michael Bennet, D-Colo.; Dick Durbin, D-Ill.; Jeff Flake, R-Ariz.; Lindsey Graham, R-S.C.; Bob Menendez, D-N.J.; Marco Rubio, R-Fla.; and Chuck Schumer, D-N.Y.

Their bill passed the Senate but would die in the House of Representatives. It would also become a point of contention for Republicans in the future.

McCain goes to Syria – 2013

McCain traveled to Syria in 2013 to meet with rebels in the conflicted country – becoming the highest ranking U.S. official to do so at the time.

McCain goes to Egypt – 2013

McCain also traveled to Egypt in 2013 and said the ousting of former President Mohamed Morsi was a “coup.”

Along with longtime colleague and friend Sen. Lindsey Graham, R-S.C., McCain pushed for the U.S. to “suspend assistance to Egypt” after the military removed Morsi from office.

McCain goes to Ukraine – 2013

McCain traveled to Ukraine in 2013 and talked to anti-government protesters who wanted the country's government to align more with Europe than Russia.

"We are here to support your just cause, the sovereign right of Ukraine to determine its own destiny freely and independently. And the destiny you seek lies in Europe," McCain said during his address.

Chairman of the Armed Services committee - 2015

McCain served as the chairman of the Senate’s Armed Services Committee since 2015.

At the time, the New York Times described the opportunity as McCain’s “dream job” and the “the only job in Washington, other than being president, that he ever wanted.”

McCain goes back to Syria – 2017

McCain made a secret trip to Syria in February 2017 to “visit U.S. forces deployed there and to discuss counter-ISIL campaign and ongoing operations,” his spokesperson later said.

McCain versus health care - 2017

McCain came back to the Senate following his brain cancer diagnosis to deliver crucial votes on Republicans’ efforts to dismantle Obama’s health care law.

He first voted to move ahead the debate on the law and was warmly received by lawmakers on both sides of the aisle. But when push came to shove, McCain voted no on the effort to repeal and replace ObamaCare.

“I believe we could do better working together, Republicans and Democrats, and have not yet really tried,” McCain said at the time. “Nor could I support it without knowing how much it would cost, how it will affect insurance premiums and how many people would be helped or hurt by it.”

Liberty Medal recipient – 2017

McCain received the annual Liberty Medal award in Philadelphia for his “lifetime of sacrifice and service.” The award is “given to men and women of courage and conviction who have strived to secure the blessings of liberty to people the world over,” the Constitution Center said.

Biden presented the award to McCain.