William J. Barnes’ wild ride started young. Before his teens he was shoplifting from the five-and-dime at Chew and Chelten Avenues. By 15, he was boosting cars. He learned to drive on a 1936 Ford coupe he stole in Germantown.

That year, 1951, he went away for the first time, for car theft. It was far from the last. He would spend 48 of the next 56 years behind bars in a variety of institutions across the city, state and country. He’s been a robber, a burglar, an escape artist and, he concedes, twice guilty of aggravated assault.

But, he insists, he’s no murderer.

Despite what District Attorney Lynne M. Abraham says.

Barnes now faces a murder charge in the death of a rookie Philadelphia policeman he shot and paralyzed 41 years ago.

“This is the most shameful event of my life,” Barnes said today during visitors’ hours at Graterford prison. “For years afterward, I’d think about him all the time. How it affected his life, what it did to my family.

“But you know what? I shouldn’t be here right now. I feel I’m being punished unfairly. For the first time in my life I feel like a victim.”

These days Barnes is known as state inmate BB8134. When he arrived at Graterford last month, the guards called him Cop Killer. They also wanted to know whether the 71-year-old would be giving them any trouble.

That’s because a dozen times during his long life behind bars he has tried to escape, and twice he made it outside, although briefly.

“I told them, ‘No, I walk with a cane now — arthritis. I’m not going anywhere.’ ”

Detectives had picked him up Aug. 22 at the ShopRite in Roxborough, where he’d been working since his last release from prison — only a month earlier. He was living at a halfway house, making plans to rent his own place.

Barnes says the detectives didn’t give him any explanation, and he felt there had to be some mistake, since back in 1993 he’d finally figured out that his life had been one reckless move after another.

He pledged to change. He’d be a model prisoner. No more escapes. No more contraband. No fights. “It would be ‘yes sir, no sir.’ ”

What began as a plan to get back into society soon “turned into a lifestyle,” he says.

Then the detectives told him that Officer Walter T. Barclay, whom Barnes had shot in 1966 during a burglary, had just died, at age 64.

The district attorney says the officer, who spent the rest of his years in a wheelchair, died of an infection directly related to the 1966 shooting. “For the Barclay family, this is justice at last,” Abraham has since told the media. William Barclay, the officer’s younger brother, said, “Barnes walked out of prison. My brother never had the opportunity to walk after he was shot.”

Barnes doesn’t have a lawyer yet. Any trial would likely turn on medical evidence, and Barnes says it’s unfair to blame him since there are so many other ways Barclay could have developed an infection. “Maybe if he died a week after it happened. Maybe six months. But after all this time, I’d want to look at the medical history.”

“Let me tell you how it happened,” Barnes begins. “It was Nov. 27, 1966. I was drunk. I was a carrying a weapon.”

He is sitting at a table in a small room off the visitors’ lounge, bathed in shards of bright light broken by a heavily barred window.

His 6-foot-1 frame is slightly stooped. Weightlifting at one time built him up to 200 pounds, but as an old man he says he looks more like the tall, skinny kid who turned out to be the “the only bad egg” in the big Barnes family.

His hair is silver and thinning over a tanned forehead that’s freckled with age spots. As he tells the story, he waves his arms, showing the tattoos faded on his forearms. One’s a rose; the other’s a cross bearing the word ‘Mom.’

“I had wandered in back of these storefronts” around Fifth Street and 66th Avenue in East Oak Lane. “I just started kicking in these doors. I didn’t even know it was a beauty salon, that’s how loaded I was.”

A woman upstairs yelled about a “maniac” kicking in doors. He was in a dark stairwell when Barclay smashed a flashlight across Barnes’ face.

“I sobered up immediately,” he said. “I got the hell up those steps.”

A friend had given him a gun stolen during a burglary, and Barnes remembers thinking he could use it to disarm the policeman or “bluff my way out of there.” He didn’t want to go back to jail.

He grabbed the rookie by the coat and pulled him close. The officer spun away, and that’s when Barnes saw Barclay’s partner and fired twice at him.

“Now, I’m totally committed,” he remembers. “I just shot at random, twice, in Barclay’s direction. One hit his leg, the other his upper shoulder.”

The partner fired back, striking Barnes. Before he fled, Barnes spotted a third officer in a nearby squad car and blasted two shots through the windshield for good measure.

“I was scared to death because I knew I was in trouble.” He went to stay in Montgomery County with a friend whose brother was a policeman. Four days later, Barnes was arrested. At trial, he pleaded not guilty, but a jury didn’t believe him. He was sentenced to up to 20 years, which he served in its entirety because of subsequent escapes. In court, he never told the true story of that night.

He saved that for years later. After his release from prison in the summer of 2006, he toured Eastern State Penitentiary and, as he walked out, told the cashier how odd it felt to pay $9 to tour a place in which he’d been locked up.

She gave him a refund, and the conversation got around to whether he’d like to lead tours himself. He earned a reputation for giving unsweetened accounts of his life in prison and what he’d done to land there.

Barnes says it’s hard to put into words what made him so bad for most of his life.

“Stealing was for me just a natural behavior. I learned later in life that I just had a low moral character. Our lives are governed by the choices we make. There are rewards and consequences. I made bad choices all my life.”