Troubled “Sons of Anarchy” actor Johnny Lewis, who once dated Katy Perry, plunged to his death off a Hollywood rooftop yesterday just after he apparently killed his elderly landlady, officials said.

Lewis, 28, was found by neighbors dead in a driveway of a 3600 block of Lowry Road in the Los Feliz neighborhood of Los Angeles yesterday morning.

The body of 81-year-old Catherine Davis was found inside the home — which was ransacked and had broken glass and a dead cat.

Neighbors have told cops they heard screams coming from the home a short time earlier at about 10:42 a.m.

“She was possibly beaten,” although coroner’s officials will determine the exact cause of death, said LAPD Cmdr. Andrew Smith.

Lewis had a two-season run on FX’s popular biker drama “Sons of Anarchy,” playing Kip “Half Sack” Epps in 2008 and 2009 episodes. His character was written off with a violent death.

But he had fallen on hard times recently, having been released from LA County Jail a week ago, according to court records.

Lewis pleaded no contest to assault with a deadly weapon and attempted burglary in separate cases this year.

He was enrolled in a drug, alcohol and psychiatric treatment program, court records showed.

Defense lawyer Jonathan Mandel said he was “surprised” and “baffled” by his client Lewis’ violent death.

The actor had been renting a room from Davis, and no one else was being sought for her murder, Smith said.

Lewis also got into brawl with two neighbors and used a two-by-four to swing at them, law enforcement sources told TMZ.

The Associated Press identified the combatants as a painter and neighboring homeowner.

Moments later, Lewis — possibly high on PCP or meth — climbed on the roof of Davis’ home and either jumped or fell to his death, the celebrity gossip Web site reported.

Lewis’ brawl with neighbors was scary, because Lewis exhibited “super-human strength” and was “phenomenally strong” during the brouhaha, according to TMZ.

“He could have fallen from any number of places or he could have tripped or fallen, or he could have jumped. We don’t know at this time,” Smith said.

The actor has been consistently working for a decade with one-time gigs on “Cold Case” and “Criminal Minds.”

He was also in the 2007 movie “AVPR: Aliens vs Predator — Requiem.” Lewis was Dennis “Chili” Childress for two seasons on Fox’s “The O.C.” in 2006.

Lewis dated sexy pop princess Perry in 2005-06.

A source close to Perry told Us magazine that the singer was “devastated” by the stunning news.

“She had to separate from him . . . to get ahead and focus on her career,” the source told Us. “He was in trouble then and she couldn’t help him.”

Perry reportedly had Lewis mind, when she co-wrote her hits “The One That Got Away” and “Circle the Drain.”

“Anarchy” creator Kurt Sutter said, in a Twitter posting, that Lewis’ death was “a tragic end for an extremely talented guy, who unfortunately had lost his way.”

Sutter continued the tweet: “i wish i could say that i was shocked by the events last night, but i was not. i am deeply sorry that an innocent life had to be thrown into his destructive path. yes, it’s day or mourning, but it’s also a day of awareness and gratitude. sadly, some of us carry the message by dying.”