When a thief snatched San Francisco Supervisor Scott Wiener’s cell phone in December, the towering, Harvard-educated former deputy city attorney responded quickly and coolly under pressure. He negotiated with the suspect to accompany him to a Wells Fargo ATM near the 16th Street Mission BART Station and participate in a swap of $200 for the return of his iPhone 6.

Cell phone theft is among San Francisco’s most common street crimes, but the victim in this case, a city official, was far from ordinary. As was one of the charges brought against the suspect, LaSonya Wells — a longtime city resident who’s spent her life battling homelessness, domestic violence and addiction between stints of incarceration.

The district attorney’s office would charge the 40-year-old African American woman with kidnapping for ransom, an allegation that could have sent her to prison for life.

Wells’ attorney has since succeeded in getting the charge dropped. She and 20-year-old son Damian Wells — a co-defendant in the case — still face two felonies and two misdemeanors, including robbery, extortion and grand theft, and the prospect of many years in prison. But the decision by the office of District Attorney George Gascón to bring the kidnapping charge at all is seen by some, including Public Defender Jeff Adachi, as absurd and unfair.

“Like thousands of San Franciscans who have had their phones snatched, it’s upsetting — but it’s not the crime of the century,” Adachi said. “To see an otherwise ordinary case suddenly be elevated to life in prison is positively medieval. The fact that the D.A. was willing to have a low-level, nonviolent woman die in prison is extremely troubling.”

Adachi said prosecutors may have been motivated by who the victim was more than by the facts of the crime.

Max Szabo, a spokesman for the district attorney’s office, strongly disputed the suggestion that Wiener’s status had any impact on the case, now being handled by Assistant District Attorney John Ullom.

Szabo said the case was charged appropriately and that the decision was not that uncommon. Between January 2015 and July 2016, he said, his office charged counts of kidnapping for ransom in 13 robbery cases. He was unable to elaborate on whether the circumstances of those cases were similar to those in the Wells case.

But Adachi and others argue that Wells’ case is an extreme example of the way race and class regularly factor into the city’s justice system. That system is now undergoing broad review and reform efforts — from a new bail system to studies of street-level police stops and the sentencing of defendants who are disproportionately poor, African American and Latino.

Wiener testified in court to the following: At around 6 p.m. on Dec. 18, Wells grabbed his phone from his hand as he stood at a red light. When he asked for the phone back, she refused and instead suggested a price for its return. They haggled, and he said he needed to go get the cash.

In court filings, Assistant District Attorney Joseph Frislid argued that once Wiener and Wells were headed to the ATM, she “made an explicit threat to Mace the victim if he tried to escape or call for help,” and implied that a man with her had a gun.

No firearm was seen or ever recovered. But filings by prosecutors state that “after that threatening, fear replaced consent; and it was no longer a case in which the victim acted freely or voluntarily. Rather, he acted under duress and could not excise himself from the situation without the fear of getting either Maced or shot or both.”

Wiener, who stands 6 feet, 7 inches, has made clear he chose not to escape after his phone was swiped, instead deciding to walk the thieves to the ATM so their faces could be captured on video there. “I think I violated all the rules of what you’re supposed to do when you’re a victim of crime,” Wiener told a KPIX-TV reporter in December.

Wells’ trial is set to begin Aug. 26, and Wiener, a former Fulbright scholar running for state Senate, is expected to testify. He declined to discuss specific issues raised by the case, saying only, “They committed a crime against me, they were apprehended, and they’re being prosecuted. I’m sure there will be a fair and just resolution.”

Wiener, who represents the Castro district, joined Gascón in 2011 to launch a city Sentencing Commission that seeks to reduce recidivism, identify alternatives to incarceration, and avoid “unwarranted disparity” in the criminal justice system.

The system is under close scrutiny in San Francisco, after controversial police shootings and the revelation that numerous officers exchanged racist and homophobic text messages. The U.S. Department of Justice is studying the police force, as has a panel of three retired judges created by Gascón, which recently concluded that police need to root out systemic bias.

The statistics being uncovered by such efforts are hard to miss in court each day in San Francisco: African Americans comprise 5.7 percent of the city’s population but 57 percent of jail inmates, according to the public defender’s office.

One of the judges investigating police practices for the district attorney’s office, retired Santa Clara County Superior Court Judge LaDoris Cordell, noted that in many ways, Wells’ case is not unlike thousands churning through the criminal justice system here that reveal a power imbalance for people of color.

Only 3 percent of felony cases are resolved by jury trials in San Francisco, a statistic that mirrors the state as a whole. Cordell called the kidnapping charge in the Wells case “ridiculous” and said it appears to be part of a larger pattern of intimidating defendants into forgoing the risk of a trial.

“It is not uncommon for prosecutors to overcharge, pile on charges and then push for plea bargains, especially when it comes to black and brown defendants,” said Cordell, who was Northern California’s first female African American judge. “For poor folks and people of color, it’s become a fact of life.”

And even though Wells’ attorney successfully fought the kidnapping charge, Cordell said, “I’m pretty concerned it was charged at all. My guess is it was charged because of who the victim is in this case, and if that is true that’s pretty sad, because that’s just an abuse of the system. It should never happen, never.”

Szabo rebuffed arguments that prosecutors pile on criminal counts to pressure defendants into plea bargains, saying his office “only files charges that we believe we can prove beyond a reasonable doubt in front of 12 San Francisco jurors.”

Wells has a lengthy history with the criminal justice system. She’s served three prison terms, one as long as five years. Most of her charges have been drug-related, but she was convicted in 2008 of a non-firearm assault with a deadly weapon.

Wells’ public defender, Yali Corea-Levy, said his client has never had much of a chance in life and that the judge in her case needs to know her history to make a fair ruling.

“People know the name Scott Wiener. They don’t know the name LaSonya Wells — and my biggest fear is LaSonya is known as ‘the defendant who stole Scott Wiener’s phone’ when there’s so much more to who this person is,” Corea-Levy said.

The attorney would not allow Wells to discuss the facts of her current case. But in a recent jailhouse interview, Wells described the ways she is trying to improve her life and the harsh path that brought her to 16th and Mission streets in December.

She said she’s lived on that street corner off and on since age 12, after an incident where her mother tried to sell her in exchange for drugs. Court filings describe a home life in which her mother worked as a prostitute, left her alone for days at a time, and smoked crack cocaine, a habit Wells would take up herself at age 10. Her mother, court records say, would hide crack pipes in her diaper “for safekeeping” and fail to protect her from violent attacks by men in their home.

In her adult life, spent mainly on the streets and in abusive relationships, Wells said she has survived 12 suicide attempts and nine overdoses.

While she awaits trial, Wells said she is trying to make the best of her time in jail. In June, she and her son earned high school diplomas together. When she can get other inmates to come, she said, she leads a nightly prayer circle.

“It helps me not to ever live like that again,” she said of her past.

Wells noted that in all her years in and out of the justice system, Corea-Levy, a Latino, is the first nonwhite attorney she’s had, and the first to take her case to trial.

Cordell said the judge in Wells’ case will have to look at her behavior behind bars and the “circumstances of her life.” When considering a sentence, Cordell said, a rough history is not an excuse, “but one would hope somebody like Scott Wiener would look at this woman and say: ‘Redemption is important and rehabilitation is important, and all of that needs to happen.’”

Karen de S á is a San Francisco Chronicle staff writer. Email: kdesa @sfchronicle.com