Ask Marion Barry about all the things that could have killed him — a gunshot to the chest, addiction to drugs and alcohol, a litany of potentially fatal diseases, not to mention a bevy of angry wives and girlfriends — and he’d find a way to credit God for sparing his life.

If anybody had a better explanation for his staying power, I never heard it.

“The reason I survive is because I have an abiding faith in God; I let God be my guide,” Barry told me in 2010, the day his colleagues on the D.C. Council voted to censure him for giving a city contract to a girlfriend.

“There is a constant fight between the Devil, which is the flesh, and the spirit, which is God,” he said.

Early Sunday morning, the flesh gave up. After being released from a hospital Saturday, Barry collapsed and died at United Medical Center in Washington. He was 78.

There are insights to be gleaned from Marion Barry’s memoir “Mayor for Life: The Incredible Story of Marion Barry, Jr.” The four-term former D.C. mayor died early Sunday. He was 78. (Mike DeBonis and Tom LeGro/The Washington Post)

Much of his legacy will be about his political triumphs and personal shortcomings — especially his four terms as mayor, the last election coming after he served a jail sentence for drug possession.

But what impressed me through the years was the intensity of the spiritual war that raged inside him and his prayerful, often public, pleas for help.

“I’m like a ship being tossed by an angry sea,” Barry intoned woefully from the dais of the Metropolitan Baptist Church before being sentenced to prison in 1990. “I wonder what I’ve done to make this race so hard to run?”

Such vulnerability endeared Barry to the multitudes. They empathized with the struggle and appreciated that a man in his position could be so honest — even about his own dishonesty.

In 1996, Barry telephoned from the Skinner Farm in Maryland, where he’d gone without public notice for a “spiritual retreat.” Rumors were that he’d relapsed and was using drugs again.

“I used to say: ‘God, I can’t handle this. Will you please allow your healing spirit to come into my life?’ And when I’d do that, things worked out,” he said. “But then I started doing it my way, trying to control everything, to fix everything and be on top of everything.”

A year earlier, Barry had been medicated with morphine while undergoing surgery for prostate cancer. The beast of addiction was reawakened.

“One day, I just started smoking cigarettes again,” Barry told me. “I hadn’t smoked in years, and the next thing I know, I’m smoking two cigarettes and then three.”

In 2002, he was arrested by the U.S. Park Police, who said they had found Barry with traces of marijuana and crack cocaine at Buzzard Point in Southwest Washington.

“The lesson for me is that if you hold on, stay strong, the storm will subside,” Barry said during one of our chats. “Trouble doesn’t last forever. Some people get so nervous just from the sight of the dark clouds that they give up before the storm even starts. But I have found that with prayer and friends, you can make it through anything.”

And he did.

Two years later, he was elected to the D.C. Council from Ward 8, a part of the city with the highest unemployment and poverty rates.

“I’m asking the Holy Spirit to help me, come hell or high water, to create a balance in my life,” Barry told me after an earlier stumble. “Either I rely on a higher power or else I’m headed for disaster.”

In 2005, he plead guilty for failing to pay most of his income taxes for five years. The following year, he was robbed at gunpoint at his apartment in Southeast Washington and later tested positive for cocaine.

In the aftermath of such defeats, Barry would simply profess his faith and try to move on.

Once, he folded his arms like he was carrying a football and bowed his head as if running for a goal line.

“Just give me a little daylight, Lord,” he said.

And there was light. When Barry needed a kidney transplant in 2009, a political donor gave him one of hers.

Later in 2009, however, Barry was accused of stalking a former girlfriend. That was followed by accusations that he gave that same former girlfriend a city contract for $15,000.

“Love is very fleeting with me, and I don’t know why,” Barry said, explaining his relationship with the ex-girlfriend. “Whenever I get that feeling — I call it my emotional buy-in — I want to hold on to it so badly. The next thing I know my judgment is clouded. I’m seeing things that aren’t there and not seeing things that should be obvious. And just like that, it’s gone.”

The spiritual remedy, he said, was “getting outside of myself and helping others.”

And that’s what you could always find him doing around this time of year, a few days before Thanksgiving. He gave out turkeys, helping to feed the hungry and homeless. He’d also help them find jobs and vow to continue his advocacy on behalf of the poor.

Say what you will about Barry, but even though his spirit may have dimmed, the light never went out.

Now the flesh is dead, but the spirit lives on.

To read previous columns, go to washingtonpost.com/milloy.