One of Chesa Boudin’s first planned policy changes when he takes over as San Francisco’s district attorney next month seeks to answer a question that has long ignited debates in the city: Should people accused of crimes face harsher punishments if their actions allegedly benefited a street gang?

The former public defender, who takes office Jan. 8, promises to put an end to filing what are known as gang enhancements against defendants — charges that can add years to felony sentences. Gang enhancements have drawn increased opposition in California, driven by statistics showing that they are disproportionately applied to people of color in poor neighborhoods.

Many law enforcement leaders say the charges are an important tool that allows them to hold gang members accountable for the fear they create in communities when they protect turf, intimidate witnesses, recruit new associates and commit violent crimes. But critics say gang enhancements yield arbitrary and excessive sentences, sending black and brown people to jail and prison at higher rates than white people who commit the same crimes, like assault or robbery.

State prison records show that of 11,484 inmates who were serving sentences with a gang enhancement as of Aug. 31, 68% were Hispanic and 24% were black. Just 3% were white.

“I want to focus on holding people accountable for what they’ve done — not who they are,” Boudin told The Chronicle. “People are seeing their families impacted by overzealous uses of these gang allegations.”

Boudin said gang enhancements are “infused with racism.” The punishments, he said, increase tensions between minority communities and law enforcement, ultimately making the city less safe. “There are violent crimes that are going unsolved,” he said, “and we need cooperation from these communities where these crimes are being committed.”

Proponents of gang enhancements, however, said the charges have been a valuable tool in protecting residents of neighborhoods plagued by organized criminals. They argue that going after gangs and the power they wield have prompted steep declines in homicides in San Francisco and around the state over the past decade.

Victims of gang crimes, proponents said, are also disproportionately people of color.

“Getting rid of the gang enhancement assumes that there’s no gang problem,” said Eric Siddall, a Los Angeles County gang prosecutor and vice president of the Association of Los Angeles Deputy District Attorneys. “The law was created for a very specific purpose with a very specific target and for very specific violence.”

To be convicted of a gang enhancement, a defendant must participate in a “criminal street gang” while knowing its members have committed “a pattern of criminal gang activity,” and while promoting or assisting in that activity. The sentencing enhancement can add two, three or four years to an underlying felony. If the felony is defined as serious or violent, the defendant can face an additional five or 10 years, respectively.

Boudin’s planned policy change is the latest flash point over whether San Francisco gang crackdowns are effective and equitable.

More than a decade ago, the city began obtaining civil court injunctions against gangs that barred alleged members from engaging in certain activities in neighborhood “safety zones,” under threat of arrest. Those named in the injunctions could not associate with each other in public, wear certain colors or seek to recruit new members, for example.

City Attorney Dennis Herrera, who filed those lawsuits, said they worked to cut crime. But opponents said the injunctions created a new set of potential crimes for a specific group of people, all of whom were African American or Latino. The city recently scaled back the program after criticism that it violated the defendants’ civil rights.

The law allowing gang enhancements came decades earlier. California’s Street Terrorism Enforcement and Prevention Act of 1988, known as the STEP Act, was designed to go after street gangs during an era of high violent crime in California.

At its zenith, California had more than 4,000 homicides in 1993. That number has steadily fallen, and just over 1,700 killings occurred last year, according to the state Department of Justice. Experts debate the reason for the drop, but many credit interventions by police and anti-violence groups in stemming retribution killings between gangs.

George Gascón, who was considered to be one of the country’s most progressive top prosecutors when he stepped down in October as San Francisco’s district attorney, charged gang enhancements. He did so, however, “only in the most serious instances,” said Max Szabo, his former spokesman.

Gascón, now running for district attorney in Los Angeles County, appears to have changed his position. At a debate Wednesday night at the California African American Museum in Los Angeles, he said he would stop charging gang enhancements and support statewide efforts to repeal the law.

But even as Gascón spoke, a gang enhancement case that his administration pursued before he left office was in trial in San Francisco Superior Court.

The murder trial opened last month, and it may not be finished when Boudin replaces interim District Attorney Suzy Loftus. Closing arguments begin Monday.

The case involves the March 2017 killing of a 44-year-old father who was celebrating his birthday with his adult son in the Mission District. Defendants Jose Mejia-Carrillo, 24, and Alexis Cruz-Zepeda, 25, are accused of being members of the 20th Street clique of the Mara Salvatrucha street gang, known as MS-13.

Family members of the victim, George Martinez, watched from the courtroom gallery last month as prosecutors played video of the deadly ambush. The district attorney’s office said the defendants accused Martinez of being a member of the Norteños, a rival gang of MS-13, before Mejia-Carrillo shot him in the back and finished him off with a point-blank shot to the head outside the Beauty Bar at 19th and Mission streets.

Prosecutors said Cruz-Zepeda distracted Martinez while Mejia-Carrillo came from behind and pulled the trigger. Mejia-Carrillo faces one count of murder, along with a gang enhancement, and a charge of being a felon in possession of a firearm.

Cruz-Zepeda was charged with a single count of participating in a gang conspiracy, a charge that refers to the gang enhancement statute’s provisions that a defendant promoted or assisted a gang.

If convicted, he faces up to 25 years to life in prison. Mejia-Carrillo faces a maximum of 25 years to life, plus 25 years for the gun charge and an additional 10 years for the gang enhancement. The defendants have pleaded not guilty.

Deputy Public Defender Steve Olmo, Mejia-Carrillo’s attorney, said authorities arrested the wrong person. The video doesn’t show the killer’s face, he said, adding that DNA from three people was found on the gun, which police found in a nearby trash can.

George Borges, the attorney for Cruz-Zepeda, said his client was simply standing on the sidewalk that night, and that Martinez asked him for a cigarette before he was shot.

Cruz-Zepeda has gotten several tattoos while in San Francisco Jail, including “MS-13” on his hand and devil horns that are associated with the gang on his biceps, prosecutors said.

“These guys are remorseless,” said Sasha Martinez, George Martinez’s ex-wife, who remained close with him. “They were planning on killing people and are earning their extra tattoos. This is what they think is OK.”

If the men are convicted, their sentencing may not happen until after Boudin takes office. Martinez’s family is worried the punishment may become more lenient.

“It’s horrible that they would take away gang enhancements,” Sasha Martinez said. “These guys are running around on the streets and they’re killing innocent people who are just trying to live normal lives.”

Boudin said he couldn’t comment on cases that are in trial. But he said MS-13 “is a real issue in the United States and California and San Francisco.” Boudin said the policy shift would not significantly affect murder prosecutions.

“In a case where there’s a homicide, those kind of cases, I’ve said I’m committed to prosecuting,” he said. “And in any homicide case, the defendant is facing life without parole.”

Joshua Mason, a frequent expert witness in Bay Area gang cases, said gang enhancements have raised the biggest questions about racial disparities in more ordinary cases.

“It’s not the insane cases that gang enhancements are applied to that are a problem, it’s the lesser ones,” Mason said. “It’s the kid who gets in a fight at a bus stop and gets labeled a gang member. For him the consequence is going to be extreme.”

The gang label is rarely applied to white defendants, said Mason, 42, who spent his 20s in state prison and was labeled a gang member after pleading guilty to an attempted murder charge. He was paroled in 2005, got involved in community outreach and enrolled at UC Berkeley.

Since then, he’s been retained as an expert witness in more than 100 cases — including at least one of Boudin’s cases at the public defender’s office.

Being a gang member “is a racially applied label,” Mason said. “There’s no consistent application of that term, except that it’s to lower-income black and brown folks. That’s about the only consistent thread.”

Siddall, the Los Angeles prosecutor, pushed back on the allegation that gang enhancements are racially unjust, saying, “It just happens to be that most gangs are Hispanic or black.” Most victims of gang crimes, he said, “are minorities from socially vulnerable communities.”

“District attorneys are charged with defending people who were vulnerable on the street and giving them justice in the courtroom,” he said. “Unilaterally doing away with the gang enhancement is not fair to those people who have to deal with gangs on a daily basis.”

Evan Sernoffsky is a San Francisco Chronicle staff writer. Email: esernoffsky@sfchronicle.com Twitter: @EvanSernoffsky