It’s been five months since he died, but Los Angeles residents still can’t seem to shake their obsession with the mountain lion known as P-22.

Fans wear pins and T-shirts that feature his wide-eyed stare. The Los Angeles Philharmonic Orchestra will perform a composition in September — at the Hollywood Bowl — that it commissioned in his memory. There are campaigns for a P-22 postage stamp and for a monument at Griffith Park, the island of wilderness where he made his unlikely home.

“They love that cat more than they do other people,” said Leonard Lee, 73, as his 6-year-old granddaughter examined a table-size topographic map of Griffith Park that is part of a Natural History Museum of Los Angeles exhibition dedicated to P-22’s “hero’s journey.”

P-22 in 2014. Credit…U.S. National Park Service, via Associated Press

In some ways, P-22 was irresistible to his hometown’s star-making machinery, with his sandy hair, muscular physique and compelling back story.

He was believed to have been born roughly 12 years ago in the Santa Monica Mountains that bisect Los Angeles. P-22’s father was P-1, the first mountain lion collared under a National Park Service program aimed at helping scientists understand the threats to wild animals in the region. Like his father, P-22 was known only by his tracking identifier even as his fame grew (the “P” stands for puma, the scientific name for the animal that is often called a mountain lion or cougar).

When P-22’s haunches were first captured on a trail camera in 2012, scientists deduced that he had done what was thought to be impossible: He crossed at least 10 lanes of Highway 101 freeway traffic and became the first known mountain lion in decades to prowl Griffith Park.

To the perpetual astonishment of his human neighbors, he stayed there for more than a decade until he began acting aggressively late last year, a sign that his health was in decline. Wildlife officials trapped and examined P-22, then determined that he should be euthanized because he was suffering trauma likely from being struck by a vehicle. Because of his isolation, he never mated.

Angelenos said they identified with a life circumscribed by huge, terrifying freeways. They loved that the cougar was a reminder that wilderness persists, against seemingly insurmountable odds, amid the dizzying chaos of Los Angeles.

“I think for a lot of people, he symbolized that all things are possible,” Alan Ruck, the actor, said in an interview, adding that he saw the mountain lion sauntering down his street one night near the park. “If you’re going to pursue a life in acting or whatever it is that draws you out here, you’ve got to believe that on some level or you’d never be able to get out of bed.”

There have been plenty of domesticated animal celebrities — canine actors Lassie, Strongheart and Rin Tin Tin are honored on the Hollywood Walk of Fame — but public adoration is rarer for wild creatures. (P-22 is ineligible for a star because he was never an entertainer, to the chagrin of some devotees.)

In 1985, a humpback whale captivated Northern Californians and was named Humphrey after he took a wrong turn and ended up in the Sacramento River, nearly 70 miles from the Pacific Ocean. And in 2011, a goose caught the attention of Angelenos and was named Maria (later Mario) after befriending a man during his regular walks around Echo Park Lake.

But perhaps no wild animal achieved the enduring celebrity that P-22 did. After he died, thousands of residents snapped up tickets for an outdoor memorial in January at the Greek Theatre on the edge of Griffith Park. Celebrities performed, and Gov. Gavin Newsom sent his condolences via video.

The feline’s star potential was immediately apparent years ago to Beth Pratt, the National Wildlife Federation’s executive director for California, after she first read about his discovery and took it upon herself to boost P-22’s profile. She started social media accounts where she sometimes wrote as the mountain lion himself. She brought a cardboard cutout of the animal to media events and wore clothing with images of P-22.

“I kind of feel like Ari on ‘Entourage,’ when it comes to P-22,” she said, referring to the lightly fictionalized Hollywood super agent on the HBO series, who propelled a young actor to stardom.

An estimated 10 to 15 mountain lions live in the Santa Monica Mountains at any given time, according to the National Park Service. The plight of P-22 ultimately helped drive an effort to build the world’s largest wildlife crossing, a $100 million project funded through public money and private donations that will give animals a chance to cross the 101 freeway unimpeded starting in 2025.

Los Angeles fans said the feline’s story tapped into something embedded in the heart of a famously atomized city. He was an avatar, they said, of survival in the face of solitude and systems seemingly designed to grind down individuals.

“L.A. will chew you up and spit you out,” said Corie Mattie, an artist who had to couch surf when she first moved to Los Angeles from the East Coast. “This is a city where people feel lonely.”

Ms. Mattie eventually built a following by creating hopeful street art in the early months of the pandemic. She has since been commissioned to paint P-22 murals, including one at a fitness studio near Griffith Park and another in a trendy shopping district on Melrose Avenue.

Miguel Ordeñana, the scientist who first spotted P-22 with a trail camera he monitored, saw the feline as a kind of immigrant, like members of his own family who came from Nicaragua. The puma embarked on a perilous journey and crossed a dangerous border to make a new home.

Now a community science manager at the Natural History Museum of Los Angeles, Mr. Ordeñana said that he was enchanted by tigers and lions as a child growing up in the dense neighborhoods of low-slung apartments and strip malls near Griffith Park. But he never believed he would see such predators in his hometown, let alone study them.

“It feels like this is a story that is for me, it’s for my community,” said Mr. Ordeñana, standing a few feet from where P-22’s tracking collar was on display as part of the exhibit he helped create.

P-22’s story was thornier for Kimberly Morales Johnson, the tribal secretary for the Gabrieleno/Tongva San Gabriel Band of Mission Indians, who have for centuries viewed wildlife as relatives whose well-being is intertwined with their own. That included P-22 — though she said she avoided using that name, because it recalled the numbering of Indigenous children when they were taken into boarding schools.

“We saw Los Angeles come up, we saw Hollywood come up,” she said. “We’re very much related: born in a place that had development take over.”

Members of local Indigenous communities worked alongside leaders of the natural history museum to bury the cougar privately with a tribal ceremony. Ms. Morales Johnson said that she hopes the episode will show how wildlife conservation can be more inclusive.

“It speaks to humanity that we all see ourselves as a little bit vulnerable,” she said. “I would hope that he has a legacy of reflection, a legacy of people looking inward to think, ‘How did this happen? And, maybe, who else is out there that this could happen to?’”