As Stockton, Calif., hit the unwelcome milestone of a 23rd shooting death this year, the city’s young mayor announced he’s considering an unusual solution to the violence — paying known violent gun users up to $9,000 to clean up their lives. If they get arrested, they have to leave the program.

Mayor Michael Hubbs, 26, wants Stockton to consider signing a contract with Advance Peace, a nonprofit in nearby Richmond, Calif., that provides stipends to men with a history of gun-related offenses. “As your mayor it is my duty to make sure public safety is a priority for our community,” Tubbs wrote in a Twitter post explaining his idea.

Critics quickly condemned his suggestion. “What are you teaching young kids if you start paying criminals to be good?” one incredulous Facebook commenter wrote. Tubbs later clarified he would seek private donations before turning to taxpayer funds to finance the controversial program.

Stockton isn’t the only city considering a partnership with Advance Peace. More than 30 other cities have contacted Advance Peace about implementing the program in their municipalities, said founder Devone Boggan. Sacramento’s city council will vote in August about whether to spend $500,000 in taxpayer money on the program, which also receives funding from private donors.

What’s behind the idea of paying criminals? It’s not the only example of giving cash to individuals to fight broader social problems. The city of San Francisco is partnering with a nonprofit to give people $10 a month if they save money. Financial incentives have also been used to encourage addicts to stop doing drugs and people who turn in an operable firearm to police departments in cities such as New York and Los Angeles can earn $100 per gun.

Studies have shown some of these monetary rewards work. Pregnant smokers in Scotland who were given shopping gift cardswere more likely to quit than those who didn’t get the cards, according to a study in the British Medical Journal http://www.bmj.com/content/350/bmj.h134. The study followed 609 pregnant smokers, of which half were offered gift cards. The longer they stopped smoking, the larger the gift card was. Significantly more smokers in the incentives group (22.5%) stopped smoking compared with 8.6% in the group that didn’t get the financial rewards.

How charities need to change to end poverty

But Advance Peace provides much more than just money to its participants, insists Boggan, the founder. Participants, called fellows, are invited to join the program if they have a history of arrests for gun-related offenses. Advance Peace enters these young men’s lives and sets them on an 18-month odyssey that includes required daily check-ins with program staff, life skills training, substance abuse counseling, anger management classes, and help with housing, education and job training. Both paid staff and “elders” — older mentors — work with the fellows.

“They’re getting a robust menu of opportunities thrown at them,” Boggan told MarketWatch.

Fellows are only eligible for the monetary stipend of up to $1,000 a month for nine months after they’ve actively participated in 60% of the program’s activities for six months and achieved specific life goals they set when they join the program.

Advance Peace works with men “who are trying to kill each other,” usually because they’re in rival gangs, and “believe they have to use their firearm to solve problems,” Boggan said. “Our whole point is to neutralize gun violence,” he told MarketWatch.

Working directly with these hard-to-reach men has created positive change, he says. Richmond saw a 60% reduction in firearm assaults causing injury or death between 2010 — when Advance Peace was launched — and 2016.

Boggan says the money is a lifeboat for fellows, not a free giveaway.

“Try to imagine a young man who has most of his life grown up in a literal urban war zone,” Boggan said. “He’s a trauma survivor living in chaos who doesn’t have a lot of hard or soft skills. [The money] is a stabilizing factor while he’s being developed, so to speak.”

There’s some validity to that idea, says Anthony Barrows, managing director of ideas42, a nonprofit consulting firm that applies behavioral science to social problems. Ideas42 studied poverty and found that when people live in “chronic scarcity” — meaning they don’t have enough money, housing, or food to flourish — their brains become over-taxed because they’re forced to cope with emergency after emergency.

That in turn can diminish self-control and harm people’s ability “to evaluate options and make high-quality decisions,” wrote ideas42 in its study. “In short, scarcity makes us less insightful, less forward-thinking, and less controlled,”the study concluded.

A small amount of money can help relieve that condition, Barrows said.

“In thinking about people engaged in [gun violence] my guess is that many of them are facing chronic scarcity,” Barrows said. “Rather than thinking about this as a financial incentive, my bet is that this is relieving chronic scarcity and allowing them to do more of the things they would prefer to be doing.”