This post has been updated.

In the midst of staring down a deadly form of brain cancer, Sen. John McCain stared down his own party early Friday in a crucial health care vote.

He didn’t blink.

McCain has been tortured. He has suffered great losses, including his campaign for the presidency. His sacrifices have even been ridiculed by the current commander in chief.

The 80-year-old Arizona Republican never wavers.

McCain’s courage and defiance are rooted in his years as a Navy fighter pilot in Vietnam, where he faced down death repeatedly.

Fifty years ago, on July 29, 1967, he was sitting in his jet on the deck of the USS Forrestal, an aircraft carrier, when a rocket from another aircraft accidentally fired, struck a nearby plane and ignited a fire that threatened to engulf McCain’s. He scrambled out of the cockpit to safety, seconds before the fire set off bombs that had fallen off another plane.

A chain reaction of explosions ensued. McCain saw a fellow pilot whose clothes were on fire. “I ran toward him,” he told the New York Times the next day. “He was 50 feet in front of me. I got closer and then the first bomb exploded. I was knocked back about 10 feet. I never saw him again.”

Three months later, on Oct. 26, 1967, McCain was flying a mission over Hanoi when an antiaircraft missile blew the right wing off his jet and he had to eject. Both arms and a leg were broken. He landed in a lake and was beaten and bayoneted by those who captured him.

He was taken to the notorious Hanoi Hilton prison, where he was further brutalized, repeatedly tortured and kept in solitary confinement for two years. The ordeal would break his body and mind, drive him to attempt suicide and make him a national hero.

McCain’s capture generated news across the United States. His picture ran on the front page of The Washington Post with the headline “Held in Hanoi.” He was filmed in an enemy hospital, and a copy of the footage was shown to his anguished parents. His father, McCain said in a 2007 interview with The Post, “got down every night and prayed.”

A few months into McCain’s imprisonment, his father, Adm. John S. McCain Jr., was named the Pentagon’s commander in chief for the Pacific, a job that essentially put him in charge of prosecuting the Vietnam War. His father insisted that his change-of-command ceremony be held aboard the USS Oriskany, the carrier from which his son had flown.

Throughout McCain’s imprisonment, his father never wrote him a letter, knowing that the enemy would use it for propaganda. But every Christmas, the elder McCain would fly to Vietnam and visit Marines near the demilitarized zone that then separated North and South Vietnam. At some point, the admiral would walk off by himself and look out to the north over the frontier, as if searching for his son.

Early in McCain’s captivity, the North Vietnamese, well aware of who their prisoner was, offered to release him. He refused, sensing it would shame his father and demoralize his comrades.

In 1972, the admiral was called on to implement B-52 bombing raids on Hanoi, where he knew his son was being held. “B-52s in those days were not exactly totally precision bombing,” McCain said. “There was never a doubt in his mind what he would do. But still, you know your kid’s there, and you’re ordering the bombing of the area.”

McCain and his fellow POWs rejoiced at the bombings. “Thank you!” the Americans shouted as the ground shook and their guards scrambled for cover.

By then, their ordeal was almost over.

Peace accords ending the war were signed in January 1973, and McCain was released in March. His father, who had already retired and was in failing health, was invited to the welcome-home ceremony in the Philippines. He asked whether the parents of other POWs were invited. Told they were not, he declined.

John McCain is escorted to the airport in Hanoi after his release in 1973. (Horst Faas/AP)

Father and son were reunited a few weeks later in Jacksonville, Fla. “It was a very touching reunion,” McCain said, between the war-weary, old-school admiral and the son he might have killed.

On May 26, 1993, McCain spoke to the Naval Academy’s graduating class. He had just been elected to a second term in the Senate. Friends from around the country had come to hear his speech at Navy-Marine Corps Memorial Stadium in Annapolis.

It was a warm, breezy day and a triumphant moment.

“For much of my life,” McCain told the crowd, “the Navy was the only world I knew. It is still the world I know best and love most.

“Here we learned to dread dishonor above all other temptations,” he said. He reviewed the achievements of past Navy heroes — pilots and gunners and submariners — and then spoke of his own ordeal.

“I have watched men suffer the anguish of imprisonment, defy appalling human cruelty . . . break for a moment, then recover inhuman strength to defy their enemies once more. All these things and more, I have seen,” he said. “And so will you. My time is slipping by. Yours is fast approaching. You will know where your duty lies. You will know.”

Read more Retropolis:

They were smokejumpers when the CIA sent them to Laos. They came back in caskets.

A young photographer took this harrowing image of the Vietnam War. He didn’t live to see it published.

Amelia Earhart reality check: The Japanese helped the U.S. look for the famed aviator

Unsealed 75 years after the Battle of Midway: New details of an alarming WWII press leak

Six Nazi spies were executed in D.C. White supremacists gave them a memorial — on federal land.

Gen. George Patton’s wife put a Hawaiian curse on his ex-mistress. She was dead within days.