The second-largest city in the U.S. to declare bankruptcy has a new solution for how to grow its struggling economy: legal marijuana. San Bernardino, California, 60 miles east of Los Angeles, is looking to raise new taxes by allowing medical marijuana sellers to open dispensaries.

“This is a no-brainer,” Karen O’Keefe, director of state policies at the Marijuana Policy Project in California, told Fox News. “More and more people are realizing that you’d really have to be in the Stone Age to oppose this.”

San Bernardino’s plan to legalize medical marijuana was triggered in part by concerns about the city’s troubles with illegal marijuana. On Wednesday, authorities discovered a massive grove of marijuana plants growing in the foothills just north of the city. Drug investigators uncovered some 2,700 mature marijuana plants along with irrigation lines and a campsite off state Highway 18, the Los Angeles Times reported.

San Bernardino officials say city law enforcement lacks enough resources to crack down on black market pot dealers, and that the city can use part of the revenue it would get from legal marijuana sales to enforce drug laws.  

The city’s fiscal troubles began in the late 2000s and were prompted largely by the massive housing downturn and recession of 2008. The city, like many other in California, was hit hard by foreclosures, which caused property taxes to plummet. The city filed for Chapter 9 bankruptcy in 2012.

California was the first U.S. state to legalize marijuana for medical use in 1996. That year, voters approved Proposition 215, which modified state law to allow people with various chronic illnesses like cancer, AIDS and arthritis to grow and use marijuana for personal use when recommended by a doctor. Local governments could still decide whether to allow dispensaries and growers to operate in their districts.

Proponents of legalizing and taxing medical marijuana in San Bernardino, including city attorney Gary Saenz, use nearby Palm Springs as an example of the potential gains to be made from making pot legal. The small city whose population is just 45,000 nets $500,000 a year in tax revenue from medical marijuana. The San Bernardino city council will debate the proposal to license medical marijuana dispensaries on Aug. 19.