Sen. John McCain died Saturday at the age of 81. McCain was diagnosed with aggressive brain cancer, in July 2017. He continued to serve in the Senate while undergoing chemotherapy and radiation.

Chapter 1: Naval Academy, Hanoi Hilton and return to the U.S.

John Sidney McCain III was the son and grandson of Navy admirals. Like many children in military families, he was born outside the United States, in the U.S.-controlled Panama Canal zone.

Following in his father’s and grandfather’s footsteps, McCain entered the U.S. Naval academy in 1954.

McCain admitted that during his time there, there were few rules he didn't break. In fact, the descendant of Navy royalty graduated fifth from the bottom of his class.

As a Navy pilot, McCain cheated death more than once.

In 1967, just months before he was shot down over North Vietnam, McCain was in the cockpit of his jet on the aircraft carrier Forrestal when an accident triggered an explosive chain reaction.

McCain jumped out of his jet and into the flames. Over 130 crewmen perished in the inferno. McCain suffered shrapnel wounds.

PHOTOS: Sen. John McCain through the years

In October 1967, McCain's A-4 Skyhawk was shot down on a bombing mission. His arms and a leg were broken after he ejected.

Once he was on the ground, an angry mob attacked McCain with bayonets. His shoulder was smashed with a rifle butt.

From there, McCain was taken to the infamous Hanoi Hilton, where he was savagely tortured for refusing to cooperate. He endured five and a half years in prison camps, including two years in solitary confinement.

McCain's captors learned quickly about his Navy heritage, calling him the crown prince.

A year after his capture, McCain's father was named commander of U.S. forces in the Pacific. The North Vietnamese offered McCain early release as a propaganda ploy -- but he refused.

In a political campaign video, McCain talked about how he survived.

“The first is faith in God, which is obvious. The other is faith in one's fellow prisoners were working just as hard as you were to resist,” he said.

In March 1973, the North Vietnamese released 108 American prisoners of war. Lt. Com. John McCain returned home, in a hurry to make up for the five and half years he lost.

He went back to Florida to his first wife, Carol, and their three children.

Six years later, while on naval assignment in Washington, D.C., McCain met Cindy Hensley, daughter of a wealthy Phoenix beer distributor.

McCain divorced his wife Carol, then married Cindy and moved to Arizona.

McCain would later write, 'My marriage's collapse was attributable to my own selfishness and immaturity.'

Carol McCain continued to support his political career.

Chapter 2: McCain enters into politics in Arizona

McCain was a military brat who never had a hometown.

Just nine years after gaining his freedom from a prisoner of war camp, McCain moved to Arizona and promptly ran for Congress.

“I think there are those of us that are new to Arizona that feel unfortunate that we were not privileged enough to be born here and lived here.”

A career that took McCain to the pinnacle of American politics was launched in Mesa, Arizona, in the summer of 1982.

After GOP Congressman John Rhodes retired, Cindy McCain bought a house in the sprawling East Valley district and McCain registered to run the same day.

During the campaign, he was attacked as a carpetbagger. McCain's response: "The longest place I ever lived in was Hanoi."

He had been an Arizona resident less than a year.

McCain knocked on doors six days a week in 100-degree heat -- his shirt soaked in sweat.

“Every door I knock on is obviously not a successful venture. They seem to appreciate the fact that I take the time to go knock on their door.”

The nationally known war hero was a man in a hurry.

“Thirty-four precincts in, McCain 39 percent with 1765. West with 25 percent with 1139.”

McCain would win the four-way primary in a solid Republican district that had sent Rhodes to Congress for 15 terms.

The supporters he called “McCain's Navy” cheered the freshman candidate's maiden election victory.

“I think the hard work part -- I'm talking about the knockin' on doors -- convinces people that you're ready to work for them.”

McCain won re-election to Congress in 1984. Then in 1986, he would run to succeed an Arizona icon: Sen. Barry Goldwater.

Chapter 3: McCain replaces Sen. Barry Goldwater

Senator Barry Goldwater was the first Arizonan to be his party's nominee for president.

“Extremism in the defense of liberty is no vice,” Goldwater once said.

With his retirement in 1986, Goldwater cleared the way for McCain, then just a two-term congressman, to take the next step in a political career that would see him make two runs for the White House.

McCain -- nicknamed the 'white tornado' -- was off and running for the Senate seat in 1985 just a few months after winning a second term. It was the next step in McCain's rise to the national political stage.

“As one former prisoner of war revisits his cell and remembers, there was great deal of pain here and also a lot of courage,” Walter Cronkite said.

Cronkite -- the most trusted man in America -- traveled with McCain to Hanoi for a documentary on the 10th anniversary of the fall of Vietnam.

Back home, McCain was clearing the field for the Senate race. Popular Democratic Gov. Bruce Babbitt chose to run for president in 1988.

Leading up to the election, McCain never trailed in the polls.

McCain had a 10-point lead late on election night but wouldn't declare victory.

The morning after the phones were ringing at the winner's Tempe home. There was a glimpse of the maverick-to-be.

“I bring some special expertise in the area of national defense and national security issues that definitely crosses party lines,” McCain said.

And a future TV personality, 2-year-old Meghan McCain, was caught on camera grabbing her dad's mic.

After the election, John McCain headed to Fiji with wife Cindy for a vacation without their children.

And the couple made a decision that their children would grow up in Arizona - not in Washington, D.C.

Chapter 4: Keating 5 scandal plagues the up-and-coming senator

John McCain's political star was soaring by the late 1980's after three election victories in Arizona in just four years.

But the freshman senator's career was nearly torpedoed by his role in the so-called Keating 5 and his close ties to a notorious figure in a nationwide scandal.

Charles Keating was public enemy number one in the national savings and loan scandal of the late 1980s.

Keating, through his Phoenix-based Lincoln Savings and Loan, was charged with bilking 22,000 investors out of a $250 million.

“I have doubts I'll even get a penny back, and this is my life savings, too,” one investor said.

Keating was also a good friend of McCain's and a major campaign donor, going back to when McCain first entered Congress.

Records show Keating flew McCain and wife Cindy to his luxurious Bahamas retreat several times.

Less than a year into his first term in the Senate, McCain was dragged into the scandal as a member of the so-called Keating Five.

Five senators were reportedly showered with gifts from Keating in exchange for pushing federal regulators to go easy on him. McCain denied he did anything wrong. but the Keating Five scandal dogged McCain for years, including during his first run for president in 2000.

“The reality of the biggest mistake that I've made in my life was attending a meeting with four other senators and four regulators because of the appearance of impropriety,” said McCain.

McCain received a slap on the wrist from an ethics committee for poor judgment. Keating served four years in prison for bankruptcy fraud.

“It's something that will always be a mark on my record and something that people will judge me for for the rest of my life,” McCain said.

After the Keating Five scandal, John McCain reinvented himself as the enemy of big-money donors trying to buy off politicians. His crusade would culminate in 2002 with the bipartisan McCain-Feingold Act, slapping new rules on campaign donations.

Chapter 5: McCain’s first run at the presidency

In 1998, the buzz about John McCain was building.

“Who do you Predict will be the presidential candidate - you think McCain?” late night host Jay Leno asked.

“It could be McCain, George W. Bush, Steve Forbes,” Newt Gingrich said.

But McCain didn't want to talk about his presidential ambitions as he cruised to a Senate re-election victory that November.

“Flattered that my name is mentioned but I'm enjoying the victory. I'll think about it at another time,” said McCain.

But six months later, the maverick was off and running for president.

McCain played to his strengths: defense and foreign policy. He showed his independent streak with a push to get big money out of politics. And he told his powerful personal story with the pledge 'I will never lie to you.'

McCain's “Straight Talk Express” hauled the candidate and a roving band of reporters across the key primary state of New Hampshire.

The bus was a mix of barnstorming and kibitizing.

Texas Gov. George W. Bush was the favorite to win the Republican nomination. The GOP establishment lined up behind him.

So McCain went straight to New Hampshire voters, famous for wanting to size up presidential candidates face to face.

McCain was everywhere in new Hampshire -- and it was paying off.

He walloped Bush by 19 points. Time magazine declared that McCain turned the Republican race upside down.

But it didn't last. It was on to South Carolina and a brand of dirty politics McCain wasn't prepared for.

“I want the presidency in the best way, not the worst way,” McCain said.

But McCain also blamed himself for flip-flopping on his stand to take down the Confederate flag at the South Carolina statehouse.

He admitted he broke his promise to always tell the truth.

Two weeks after Bush was routed in New Hampshire, he trounced McCain by 11 points in South Carolina.

“I'm gonna fight with every ounce of strength I have,” said McCain. “I'm gonna keep fighting clean, I'm gonna keep fighting fair and I'm gonna keep fighting the battle of ideas.”

By March 2000, McCain's presidential campaign was in trouble. He was winning over independents but had a hard time connecting with southern Republicans.

And his bitterness over the Bush campaign's dirty politics in South Carolina would linger.

After 2000, McCain shared his favorite joke:

“I feel terrible for all the mothers in the state of Arizona. Because, as you know, Barry Goldwater from Arizona ran for President of the United States, Morris Udall from Arizona ran for President of the United States, Bruce Babbitt from Arizona ran for President of the United States, and I, John McCain from Arizona ran for President of the United States…Arizona may be the only state in the nation where mothers no longer tell their children that some day they can grow up and be President of the United States.”

Chapter 6: The Republican nominee, McCain runs with Sarah Palin

After losing the 2000 Republican presidential nomination to George W. Bush, McCain was considered next in line for the 2008 nomination at the end of Bush's two terms.

But that campaign nearly blew up on the launch pad -- amid weak fund-raising and staff shake ups. By September 2007 McCain had been written off as a viable candidate.

One year later, McCain completed an astonishing comeback. He won the Republican nomination and had one more surprise in store. Her name was Sarah Palin.

She was a blast of fresh arctic air.

“I love those hockey moms. You know they say the difference between a hockey mom and a pitbull? Lipstick,” Palin said at the Republican National Convention.

Alaska governor Sarah Palin had them at *pitbull.*

The 2008 RNC went wild when the governor of Alaska accepted the vice presidential nomination on a ticket with presidential nominee Sen. John McCain.

“Just the right partner to help me shake up Washington D.C., Gov. Sarah Palin,” said McCain on stage.

A top adviser reportedly told McCain that Palin would be a *high risk, high reward" running mate.

McCain's answer: "I've been a risk-taker all of my life."

In the weeks after the convention, the risk paid off and McCain's poll numbers popped.

Then Palin hit turbulence.

After a disastrous interview with Katie Couric, Palin was mocked by Tina Fey on Saturday Night Live.

McCain had to answer for his running mate.

“She is a dynamic person with executive experience, leadership, reform,” McCain said. “She's exactly what Washington needs.”

But Washington had other worries. The world's largest economy was heading off a cliff.

McCain suspended his campaign, heading back to D.C. for high-level talks on a bank bailout. His campaign never recovered its momentum.

McCain still had his moments, including defending his Democratic opponent at a town hall.

When an audience member said she couldn’t trust Barack Obama and called him an Arab, McCain cut her off.

“No ma’am, no ma’am. He’s a decent family man, a citizen, that I just happen to have disagreements with,” McCain told her.

And after losing the presidency to Obama -... McCain never quit defending Palin.

“I have never seen sustained, personal family attacks that were made on Sarah Palin and her family in my life,” he said.

Chapter 7: McCain tackles immigration reform, the VA Hospital

It was one of John McCain's favorite jokes.

“After I lost, I slept like a baby. Sleep two hours, wake up and cry. Sleep two hours, wake up and cry.”

McCain didn't have much time to cry after losing the White House to Barack Obama in 2008. He was up for re-election in 2010 -- and had to get right with the Arizona Republican Party's right wing.

McCain flip-flopped on immigration during the party primary -- the reformer morphed into a border hardliner. He easily won re-election.

Just a few years later McCain was an immigration reformer again.

"The Republican party understands that a majority of Americans want this issue resolved. There are members of Congress who represent districts where the majority do not support immigration reform and we understand and respect that."

The bipartisan Gang of Eight proposed a sweeping $40 billion overhaul of the nation's immigration laws that included a path to citizenship. The bill passed the Senate, but died in the House.

“We've got a senator that's gone astray from our party and our party's platform and no longer listens to the party,” said Tim Schwartz, a GOP committeeman.

The GOP base labeled him McAmnesty. And in the winter of 2014 -- the Arizona Republican Party formally censured the 2008 presidential nominee for what it called his liberal voting record.

“I will match my record of being correct on events that have taken place since Barack Obama, which mine have been consistently right and his have been consistently wrong.”

McCain returned to issues where he was most at home -- defense and foreign policy.

The nation's best known veteran would take on a new mission in 2014 after Phoenix became ground zero for a national scandal: veterans were dying while waiting for care at the VA Hospital.

“What may have been a coverup as you know, is this business of the length of time it takes a veteran to be seen.”