For 60 years, John McCain's life was defined by public service — and hard choices.
He was a pilot in Vietnam and survived captivity for nearly six years, suffering torture and abuse that would leave him permanently disabled. He resisted early release to avoid demoralizing his fellow prisoners, the New York Times wrote early this week. When he did return from war, he returned on crutches.
He'd later enter politics, serving in Congress for nearly four decades, and running for president twice. His political career was marked by his willingness to break with his party, a trait that earned him a reputation as a maverick.
A study of McCain's life, who died Saturday after ending treatment for brain cancer, shows the hard road leaders often need to travel to make change happen. Here are 3 examples from a long career that can inspire and guide any leader.
In a farewell message to Americans written before he died, McCain wrote that understanding people's differences and refusing to quit is key to navigating challenges.
"Do not despair of our present difficulties but believe always in the promise and greatness of America, because nothing is inevitable here," he wrote.
He acknowledged that Americans are often heavily divided.
"We are 325 million opinionated, vociferous individuals," he wrote. "We argue and compete and sometimes even vilify each other in our raucous public debates."
McCain was known for his warnings that tribalism and polarization he felt threatened the government's ability to lead. In a speech to the Senate last year, he told politicians that he thought their deliberations were partisan and standing in the way of progress.
"We're getting nothing done, my friends. We're getting nothing done," he said, according to CNN.
In his farewell letter, McCain said that cooperation and understanding, starting with leaders, is key to moving forward.
"But, we have always had so much more in common with each other than in disagreement," he wrote. "If only we remember that and give each other the benefit of the presumption that we all love our country, we'll get through these challenging times."
After Barack Obama won the Democratic presidential nomination in August of 2008, John McCain's campaign responded as most opponents would — with a TV ad. But unlike most political ads on the air, McCain didn't take the opportunity to campaign, as pointed out in Inc.com.
"Senator Obama, this is truly a good day for America," he says.
"Too often, the achievements of our opponents go unnoticed. So I wanted to stop and say, congratulations."
McCain's campaign communications director Jill Hazelbaker, said the TV spot was "an historic ad — I think this is the first of its kind," according to Politico.
During a contentious and difficult campaign, McCain showed it's possible to acknowledge the accomplishments of others while not losing sight of your own goals. This approach can help you find ways to build bridges and work better with others. "Tomorrow, we'll be back at it," McCain says in the final line of the ad. "But tonight, Senator, job well done."
Ten years after winning that election, former President Obama said in a statement that although he and McCain came from different backgrounds, they shared the same ideals.
"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," Obama wrote.
In 2000, when McCain was campaigning for the Republican presidential primary in South Carolina, he was asked what he thought of the Confederate flag flying from the South Carolina Statehouse dome.
McCain didn't speak out against the flag, which he later regretted, according to The New York Times.
''I feared that if I answered honestly, I could not win the South Carolina primary,'' McCain said in a speech in 2000. ''So I chose to compromise my principles. I broke my promise to always tell the truth.''
McCain lost the Republican primary, and his opponent George W. Bush won the election that November.
'I do not intend for this apology to help me evade criticism for my failure," McCain said during a speech in South Carolina. "I will be criticized by all sides for my late act of contrition. I accept it, all of it. I deserve it. Honesty is easy after the fact when my own interests are no longer involved. I don't seek absolution.''
Acknowledging mistakes can help leaders build trust. This step ensures a mistake is not seen as a failure, but as a relatable way to grow and change.
About 60 people gave him a standing ovation after his speech, applauding him for being honest, according to The New York Times.
Like this story? Subscribe to CNBC Make It on YouTube!