Dennis Peron, a legendary activist who helped legalize medical marijuana in California, died Saturday afternoon in a San Francisco hospital. He was 72 years old.

Peron was a force behind a San Francisco ordinance allowing medical marijuana, a win that later helped propel the 1996 passage of Prop. 215, which legalized medical use for the entire state. A Vietnam War veteran, Peron spent some of the last years his life on a 20-acre farm in the rolling hills of Lake County, growing and giving away what he once sold: medical marijuana.

“A man that changed the world,” Jeffrey Peron wrote in a Facebook post, along with a photo of his brother — impish and good-looking — dressed in a gray suit and a blue striped tie. “This is the Dennis I want to remember.”

Throughout his long and checkered career, Peron was a gay activist, pot enthusiast and sometimes-vigilante at odds with the law. He was among the first to argue for the benefits of medicinal marijuana for AIDS patients as the health crisis overtook San Francisco. The epidemic also took his partner, Jonathan West, in 1990.

LATEST SFGATE VIDEOS

Now Playing:
  • Now Playing
    Rock Lab Launch in January 2018 Rocket Lab
  • Crowd at Davos boos after Trump attacks media as 'fake' White House
  • Fresh powder at Kirkwood Ski Resort, Jan. 25, 2018 San Francisco Chronicle
  • Band welcomes Donald Trump to Davos stage White House
  • Immigration Q&A: What's the deal with H-1B visas? San Francisco Chronicle
  • Do you know your California state symbols? Martin do Nascimento
  • New population of red handfish discovered off Tasmanian coast Antonia Cooper/IMAS
  • The San Francisco Chronicle NBA All-Star mock draft San Francisco Chronicle
  • Official trailer: Winchester Lionsgate
  • Hail storm in Petaluma Jan. 25, 2018 Lisa

San Francisco’s Board of Supervisors recognized Peron, suffering with late-stage lung cancer, with a certificate of honor last year.

“The father of medical marijuana,” one supervisor called him in the meeting.

“I came to San Francisco to find love and to change the world,” Peron said in reply, leaning on his walker. “I found love, only to lose him through AIDS. We changed the world.”

But once, Peron was just a “gay kid from Long Island who joined the Air Force to get away from home,” as he described it in his 2012 book, “Memoirs of Dennis Peron.” He then moved to a commune in the Haight, where he befriended Supervisor Harvey Milk and began selling marijuana in the Castro.

In 1991, Peron founded the first public cannabis dispensary in the country — originally called the San Francisco Cannabis Buyers Club — during the height of the U.S. drug war.

He, along with “Brownie” Mary Rathbun, formed a resistance, doling out the herb to AIDS patients and shifting the public conversation about how it should be used. He was busted more than four times for illegally dealing the drug, spent time in jail and was once shot in the leg by a cop. The club, which served 9,000 clients, was closed by a San Francisco Superior Court judge in 1998.

“The city and the country has lost a cannabis leader who lived life on the edge,” said Terrance Alan, a member of the city’s Cannabis Commission. “He lived his whole life on the edge, and that’s what allowed us to lead in cannabis. Not many of people would have had the courage at the time that he took up the mantle.”

After the club was shut down, Peron moved to the country. He changed his business model and began providing living plants to patients. Eventually, after being diagnosed with lung cancer, he moved back to the “Castro Castle,”’a former bed-and-breakfast he owned with his husband, John Entwistle.

Lizzie Johnson is a San Francisco Chronicle staff writer. Email: ljohnson@sfchronicle.com Twitter: @LizzieJohnsonnnn