SEDONA, Ariz. - U.S. Sen. John McCain, the son and grandson of four-star admirals, was bred for combat. He endured more than five years of imprisonment and torture by the North Vietnamese as a young naval officer and went on to battle foes on the left and the right in Washington, driven throughout by a code of honor that both defined and haunted him.
Sen. McCain, 81, died Aug. 25 at his ranch near Sedona, Arizona, his office announced in a statement. The senator was diagnosed last July with a brain tumor, and his family announced this week that he was discontinuing medical treatment.
John Sidney McCain III was born Aug. 29, 1936, in the Panama Canal Zone and into a family whose military lineage included an ancestor who served as an aide to Gen. George Washington during the Revolutionary War.
He was named for the first father and son in Navy history to become full admirals: John S. "Slew" McCain Sr., a top Pacific-theater commander in World War II, and John S. McCain Jr., commander for all armed forces in the Pacific during the Vietnam War.
After transient early years spent mostly at military bases, he graduated in 1954 from a Virginia boarding school. Following his father's and grandfather's path, and his parents' often-stated expectations, Sen. McCain then enrolled at the U.S. Naval Academy, which he later recalled as "a place I belonged at but dreaded."
Sen. McCain often boasted later in life, he graduated fifth from the bottom of the 899-member class of 1958.
From there, he headed to Pensacola, Florida, to be trained as a Navy pilot and continue the rowdy existence of his days at the academy.
Sen. McCain requested and got orders to do a Vietnam combat tour, joining a squadron on the supercarrier Forrestal in the Tonkin Gulf. On July 29, 1967, having flown five uneventful bombing runs over North Vietnam, he was preparing for takeoff when a missile accidentally fired from a nearby fighter struck the fuel tank of his A-4 Skyhawk, Sen. McCain wrote in his memoir. It set off explosions and a fire that killed 134 crewmen, destroyed more than 20 planes and disabled the ship so severely that it took two years to repair.
His own injuries being relatively - and miraculously - minor, Sen. McCain, then a lieutenant commander, volunteered for dangerous duty on the undermanned carrier Oriskany. He joined a squadron nicknamed the Saints that was known for its daring; that year, one-third of its pilots would be killed or captured.
On Oct. 26, 1967, Sen. McCain was on his 23rd mission and his first attack on the enemy capital, Hanoi. He dove his A-4 on a thermal power plant near a lake in the center of the city.
As he released his bombs on the target, a missile blew off his right wing. The lieutenant commander pulled his ejection-seat handle and was knocked unconscious by the force as he was hurled from the plane. He came to when he hit the lake, where a mob of Vietnamese had gathered.
So began 5 1/2 years of torture and imprisonment, nearly half of it spent in solitary confinement. In March 1973, nearly two months after the Paris peace accords were signed, Sen. McCain and the other prisoners were released in four increments, in the order in which they had been captured. He was 36 years old and emaciated.
The effects of his injuries lingered for the rest of his life: Sen. McCain was unable to lift his arms enough to comb his own prematurely gray hair, could only shrug off his suit jacket and walked with a stiff-legged gait.
Sen. McCain retired from the Navy at the rank of captain and moved to Arizona in 1981, with an eye toward running for Congress. The opportunity presented itself the following January when a longtime Republican congressman, John Rhodes, announced his retirement. That same day, the McCains bought a house in Rhodes's Phoenix district, and John McCain was soon in a race against three other candidates.
John McCain was a Capitol Hill celebrity from the moment he was elected to the House.
In many areas, he was a reliably conservative voice and vote. But from the beginning, he showed what became a trademark streak of independence. He called for the withdrawal of Marines from Lebanon in 1983 after a terrorist bombing left 241 U.S. service members dead; he voted to override President Reagan's veto of sanctions against the apartheid regime of South Africa in 1986.
And - surprisingly to many - as a member of the Senate, he worked to normalize relations with Vietnam.
When Sen. McCain announced in September 1999 that he was running for the Republican nomination for president, it was yet another assault on the political establishment, which had put its chips on then-Texas Gov. Bush, the son of a former president.
Bush handily defeated Sen. McCain in South Carolina, beginning the end of the senator's insurgent campaign.
But by the time he ran again in 2008, Sen. McCain had come to terms with Bush and the Republican Party, and they with him. His campaign all but collapsed in the summer of 2007, but Sen. McCain battled back and won the nomination.
Still, he was flying into head winds in the general election. The war in Iraq, which he had supported, was unpopular, as was the Republican incumbent in the White House. Palin's erratic, unprepared performance became a story in itself.
Most important, he was up against a Democrat who seemed tailor-made for that moment in history: Obama was better financed, ran a better campaign, had opposed the Iraq War and offered the captivating prospect of putting an African American in the White House for the first time.
Nonetheless, the race looked as if it could be close until the final weeks, when the financial system went into a meltdown. Sen. McCain, so sure of himself on national security issues, seemed less than savvy at handling economic ones. Even as the crash was building into the worst economic crisis since the Great Depression, the senator declared that "the fundamentals of our economy are strong."
Returning to Congress, Sen. McCain became a frequent antagonist of the man who had defeated him for president. He contended for instance that Russian President Vladimir Putin's 2014 invasion of Crimea was a result of "a feckless foreign policy where nobody believes in America's strength anymore."
When Sen. McCain got the gavel of the Armed Services Committee in 2015, he told The Post that he was having more fun than at any time since his 2000 presidential campaign. That same year, he announced plans to run for a sixth term in the Senate.
Sen. McCain won handily, and in his victory speech to supporters, he predicted that campaign "might be the last."
"Thank you one last time," he added, "for making me the luckiest guy I know."
In his final book, reflecting on his life as it came to an end, McCain wrote: "It's been quite a ride. I've known great passions, seen amazing wonders, fought in a war, and helped make a peace. I made a small place for myself in the story of America and the history of my times."