Read more news from CNN

How McCain's faith sustained him and allowed him to forgive himself

Phoenix (CNN) He rarely showed it in his public life, but John McCain spent a lot of time thinking about this moment -- when he would face his final judgment before God.

As his closest friends have often noted this week, he was a man of great contradictions: a playboy fighter pilot turned hero, a romantic and cynic, and as South Carolina Sen. Lindsey Graham said, a man who came to accept that his honor and his imperfections would always be in conflict.

Through all of his internal struggles with his mistakes or regrets, it was his quiet faith that sustained him. Few knew that the Episcopalian, who refused to flaunt his faith on the campaign trail, could quote Scripture at length and served as the "room chaplain" to his fellow prisoners of war in North Vietnam.

His own religious awakening began in that prison and the path ended here in Phoenix at his wife's Baptist church, where McCain developed a deep belief in forgiveness and God's grace.

Those touchstones that provided solace to McCain throughout his life are threaded through the religious services that begin today at North Phoenix Baptist Church, and continue at the Washington National Cathedral Saturday, culminating with a private ceremony at the US Naval Academy where he will be buried Sunday in a plot overlooking the Severn River.

The readings McCain chose encapsulate the lessons he strove to impart: duty, sacrifice, honor, bi-partisanship, service to one's country and a commitment to a cause greater than one's self.

But they also include the prayers that carried him through his torment as a prisoner of war, and helped him through his life journey as he sought to reconcile his mistakes with his heroic public image.

I did a long interview with then-presidential-candidate McCain about his faith on his campaign plane in April of 2008. Though I'd traveled with him for many months, starting in snowy New Hampshire when he was at the bottom of the pack and had endless hours to talk to reporters, his religion was still a curiosity to me.

Unlike other politicians I had covered, he shied away from using his faith to his political advantage, even as he struggled to win over evangelical voters.

I knew he was voracious reader, but was startled as we talked by how effortlessly he quoted Scripture. He explained that prayer and church had been an ingrained part of his life in high school, where he attended chapel each morning and Sunday evenings.

It wasn't until his plane was shot down over Hanoi that he began to rely on his faith. In solitary confinement, he has written that he prayed "more often and more fervently than I ever had as a free man."

His longtime friend Charlie Black, a pallbearer today at North Phoenix Baptist Church, recalled talking to McCain about how he somewhat reluctantly became the "room chaplain" for his fellow prisoners.

"When he was out of solitary (his captors) wouldn't give him a Bible, so he would come up with verses from memory that they could study together," Black recalled in an interview Wednesday.

McCain told me that he was "very slow in maturing." He said he knew right from wrong, the Bible, the Nicene Creed and the Apostles' Creed, and the tenets of his faith, but neglected them until that five-and-a-half year period in Hanoi.

"The time came that I could fall back on them as a net, as a way of salvation," McCain said in the 2008 interview. It was the same period, as former Sen. Jon Kyl noted at the Arizona State Capitol service Wednesday, that McCain "fell in love with his country when he was a prisoner in another." Faith and his ideal of "Country First" became intertwined.

In captivity, McCain urged his fellow prisoners not to pray for their release or their own personal success.

That stayed with him. "I pray to do the right thing so I won't look back in regret or embarrassment or even shame that I betrayed my principles and my faith," he told me in 2008.

He found a home at Cindy McCain's church in Phoenix, where he came to love his pastor's message about grace: "that we're all sinners, but we can benefit from God's grace if we recognize those sins and move forward," he said.

That idea is woven through some of the Bible verses he chose for today's service and those this weekend, particularly in 2 Timothy 4:6-8 that will be read by his son Andrew McCain:

"For I am already being poured out as a drink offering, and the time of my departure has come. I have fought the good fight, I have finished the race, I have kept the faith. Now there is in store for me the crown of righteousness, which the Lord, the righteous Judge, will award to me on that day; and not only to me, but also to all who have longed for his appearing."

The inclusion of those verses, Graham said, gave him the most comfort that his friend was satisfied with the life that he led and had apologized for his mistakes.

"The public John McCain felt the need to reconcile his imperfections," Graham said, citing McCain's position change on the Confederate flag as an example. "The private John McCain was reassured that you can be forgiven."

In their totality, the readings and prayers in all the services represent "a Christian message," Black said. "Always trying, never quitting and trying follow the golden rules."

In Saturday's service at the National Cathedral, the messages of humility, selflessness, taking a stand against oppression -- a theme in former New Hampshire Sen. Kelly Ayotte's reading from Wisdom 3:1 "The Destiny of the Righteous" --- and putting country before one's self, are also an implicit contrast to the values of the current President, said former McCain strategist Steve Schmidt.

Before his death, McCain pointedly made it known that President Donald Trump was not invited to the services commemorating his life.

"Even in death he's provoked one last fight, forced once last conversation, a choice in oppositional virtues," said Schmidt, who infuriated McCain by speaking in derogatory terms about his running mate Sarah Palin after the 2008 presidential campaign.

"Trump is his analogue," Schmidt said, "Valor to cowardice, sacrifice to self-interest, service to greed." He noted the vast international interest in McCain's life that has been evident in recent days: "People see in McCain what they like about America: the traditions of our country, the values of our country."

In the last months of his life, McCain's friends took comfort in the various iterations of the refrain he came back to again and again in their private conversations: "I wasn't cheated."

From the program of the services, they also see the friend who felt the pressure of living up to the example of his father and grandfather, both four-star admirals, and the man who wrote in one of his memoirs that he tried to live a life of balance "between pride and regret, between liberty and honor."

On Saturday at the National Cathedral, McCain's son Jimmy -- who followed the family's military tradition by enlisting in the US Marine Corps -- will read the poem McCain loved, Requiem by Robert Louis Stevenson.

McCain's longtime co-author and close friend Mark Salter noted that the Arizona senator read it at his own father's funeral: "It was sort of a code for him."

With Jimmy's reading, McCain's family's military tradition will come full circle. And it is classic McCain, his friends said, a "poet warrior" and romantic to the end.

Under the wide and starry sky, Dig the grave and let me lie. Glad did I live and gladly die, And I laid me down with a will. This be the verse you grave for me: Here he lies where he longed to be; Home is the sailor, home from sea, And the hunter home from the hill.

Outbrain