SAN FRANCISCO — A 22-year-old man was sentenced to three years in federal prison Wednesday, in a gun case that stemmed from store robbery investigations that, on the state side, resulted in his enrollment in mental health diversion.

John Gough, of San Francisco, was arrested on federal charges of being a felon in possession of a firearm last December, and has been in Santa Rita Jail ever since then. On Wednesday, U.S. District Judge Charles Breyer sentenced Gough to three years in federal prison with credit for 14 months spent in pretrial incarceration.

The sentence is a victory for the defense; federal prosecutors asked for nearly four years, and Breyer gave Gough’s attorney exactly what he requested in court filings prior to the sentencing hearing. This case also illustrates the stark differences between the Department of Justice under the Trump Administration, which filed the case, and the San Francisco DA’s office under Chesa Boudin, which has pledged to find alternatives to imprisonment.

In the weeks before Gough was arrested on the federal warrant, he was scheduled to be released from San Francisco jail to a halfway house, after qualifying for mental health diversion program there. The San Francisco District Attorney’s office charged Gough in connection with December 2019 store robberies, including a Christmas Eve McDonalds robbery where Gough was found to be in possession of the revolver federal prosecutors later charged him with possessing.

In November 2020, one month before he was charged federally, behavioral health and services officials noted Gough was ‘completely medication adherent since starting on medications while in custody and there have not been any behavioral issues noted’ and there were no ‘reports of violent behaviors since Mr. Gough has been in custody,’ ” according to court records.

Before he could be transferred to the halfway house, he was charged by the Northern District of California U.S. Attorney’s office. Instead of turning Gough over to the U.S. Marshals, the San Francisco jail released him outright, and he remained free for three months until he was arrested and taken into federal custody after showing up to a meeting with his parole agent.

The federal gun charge stems from the Christmas Even incident when Gough allegedly walked into a McDonalds, and pulled back the hammer of his revolver when the clerk denied him cash. When police questioned him about the incident, he claimed no memory, explaining he suffered from a mental illness, but also adding, “Cocaine is a hell of a drug,” according to prosecutors.

Federal authorities linked him to two other robberies, including a 7-Eleven store robbery earlier that day, where he asked a clerk, “You going to die over this money?”

“We all got to die sometime,” the clerk responded.

The feds asked for a three-year, 10-month prison term, writing in court papers that Gough has five prior arrests in connection with violent crimes, including multiple hit and runs and an assault with a deadly weapon.

“Gough’s string of armed robberies and his history of violent conduct present a real threat to the public,” Assistant U.S. Attorney Leif Dautch wrote in a sentencing memo. “The facts surrounding this incident, Gough’s criminal history, his use of a variety of different weapons against victims, and the failure of a prior prison term to deter his criminal conduct all warrant a substantial term of imprisonment here.”

Gough’s attorney, assistant federal public defender Hanni Fakhoury, wrote in court records that Gough was a victim of severe child abuse who was diagnosed with mental illness at age 14, by staff at juvenile hall. He called Gough’s mental illness the underlying cause of his criminal history, writing, “between his drug use and the constant switch of medications, would regularly have manic episodes.”

“Mr. Gough accepts responsibility for his mistake and feels deep regret for his actions and particularly the effect it had on the McDonald’s workers. He is eager to get back into the kind of dual diagnosis treatment program he thought he was going to when his case was in state court,” Fakhoury wrote, later adding, “He continues to take his medications and has stayed out of trouble in the close to six months he has been incarcerated since his arrest by the federal government.”