OAKLAND — A man who’d been hired to work security for an illicit casino avoided jail after pleading guilty to being a felon in possession of a firearm, court records show.

Ray Gilbert, 27, was found in possession of a gun that had been used, just 17 days earlier, in the July 2023 killing of 21-year-old Mynyamani Stevenson outside of a Lutheran church in Oakland, according to police and federal prosecutors. Gilbert’s lawyer chided prosecutors for making the “highly inflammatory” insinuation that Gilbert was involved in the killing and said they were eventually forced to admit having “no direct evidence” implicating him.

“At most, the government’s evidence shows that Mr. Gilbert is connected to people and places that are negative influences. Based on the facts presented, the Court cannot conclude that Mr. Gilbert was personally responsible for violent conduct, nor should it penalize him for associations rather than conduct,” Assistant Federal Public Defender Gabriela Bischof wrote in a sentencing memo.

U.S. District Judge Yvonne Gonzalez Rogers sentenced Gilbert to time served. Prosecutors argued for a multi-year prison term, which would have amounted to about six months in jail, given that Gilbert had already racked up credit for time spent in jail while the case was pending, court records show.

When Gilbert was indicted on federal charges in 2023, prosecutors accused him of being part of a “robbery crew” affiliated with the Oakland-based Case Gang and said that he was caught with two guns within six weeks — the first one during a raid on an illegal casino in Oakland, and the second during a raid of his home. After Gilbert’s federal indictment, the Alameda County District Attorney’s office dropped five criminal cases against him, including two probation violation charges, two gun cases, and one involving alleged retail theft, court records show.

Gilbert spent about two years behind bars after the case was filed and has since found work at an East Bay warehouse after his release. Bischof said in court filings he has turned a corner in life. She quoted Gilbert’s own writing, in response to the question, “What influenced you to commit this offense?”

“I thought I needed protection. My dad died and my friends died and I thought this was what I needed,” Gilbert wrote. “But I now know that it isn’t. I can stay away from bad influences, I can stay away from violent places, I can stay away from violent people so that I don’t need that protection, so that I can just go to work and go to school and support my family.”

The defense sentencing memo says Gilbert has experienced violence throughout his life, having been shot on five separate occasions, the first of which occurred when he was 13. His father was murdered when he was 5, and as an adult, in 2021, he was bitten for 45 seconds by Purcy, the K9 operated by disgraced ex-Antioch policeman Morteza Amiri.

In that respect, Gilbert was far from alone; Amiri’s dog bit dozens of people. Earlier this year, Amiri was sentenced to federal prison for siccing Purcy on a man without just cause, which a jury found was a violation of the victim’s civil rights.

Gilbert has also consistently been a law enforcement target, but has thus far managed to avoid lengthy prison terms. Gilbert’s phone was also wiretapped in 2020 — along with six other suspected Case Gang affiliates — as part of a joint police investigation into the unsolved 2020 killing of 27-year-old Shawn Tillis in San Pablo, and the nonfatal shooting of an ex-Case member who’d been deemed a “snitch” by the gang, according to court records.

None of the suspects were ever charged.

Similarly, no one has been charged in the killing of Stevenson, or in the seemingly related homicide of Tatiana Brice, 26, who was found shot to death in August 2023, in the East Oakland hills. Oakland police said in court filings that Brice had been bragging to people at an illegal casino that she was involved in Stevenson’s killing. She was shot to death about 12 hours after police raided Gilbert’s home and found the pistol used to kill Stevenson, according to court filings.