A mentally ill man in a maximum-security area of Dublin’s Santa Rita Jail has been charged with killing a fellow inmate minutes before walking out of his cell to be set free, The Chronicle has learned.

The homicide, which jail officials believed to be by asphyxiation, happened the afternoon of July 6. Officials with the Alameda County Sheriff’s Office did not publicly report the incident, a departure from its standard practice, even though they informed the state and county authorities required by law.

A spokesman for the department confirmed Thursday that James Hunter, 22, was charged in the killing of Antonio Rodriguez, 27, after inquiries from The Chronicle, which was contacted by a woman who said her brother was accused in the slaying.

Denisha Peña, 39, Hunter’s sister, said she has been frustrated with the lack of information given to the family about the case.

She said the family learned Hunter was in jail on Aug. 11, when they called local shelters, one of which said he had been arrested. A call to Santa Rita Jail confirmed he was incarcerated.

“A person answered the phone and told my mom the charges, including murder,” said Peña. “And I was like, ‘murder?’ He can be violent if he’s under the influence, but he’s not going to provoke anything.”

Hunter was initially booked on suspicion of vandalism at the UC Berkeley campus, though it wasn’t clear Thursday what date he was arrested. Monica Duckett, his mother, had made a missing-person report to the Oakland Police Department before finding out he had been jailed.

Hunter’s cellmate, Rodriguez, had been in custody since Aug. 29, 2015, on charges of attempted murder, discharging a firearm in an inhabited dwelling and illegal possession of a firearm with a prior felony conviction, said Sgt. Ray Kelly, a spokesman for the sheriff’s office.

On the afternoon of July 6, a jail control booth technician remotely opened the doors of Hunter’s cell and ordered him to leave because he was due to be released that day, Kelly said.

“The inmates know when they leave a cell they’re supposed to close the door,” he said.

At 4:38 p.m., a jail deputy patrolling the hallway noticed that Hunter hadn’t closed the door all the way. Inside the cell, he found Rodriguez dead on the floor, Kelly said. The incident was treated as a suspicious death before investigators with the sheriff’s office later ruled it a homicide.

Officials with the Alameda County coroner’s bureau said they couldn’t discuss the case because of an information hold by the sheriff’s deputies investigating the case.

Hunter, who had made it to a staging area of the jail, where inmates go right before being released, was kept in custody. He is being held on a murder charge.

Alanna Coopersmith, his court-appointed defense attorney, said he will enter a not-guilty plea on his next court date, Sept. 7. She declined to comment further.

Peña said her brother has behavioral problems and is a diagnosed schizophrenic. Duckett said he should not have been housed with someone else because of his mental health problems, especially someone accused of violent crimes.

“I feel like there’s a lot of questions that need to be answered,” Peña said. “Why were they together? It doesn’t make any sense. I just want to know what happened.”

Kelly said it’s common for inmates with mental illness or behavioral problems to be housed with other inmates, and deputies conduct hourly patrols. He said no cameras would have captured what happened in the cell. No weapons were found, Kelly said.

Duckett said that when she visited her son in jail last week, he didn’t seem to realize what he had been accused of doing.

“He’s not a bad kid,” Duckett said. “He don’t carry guns. He don’t hang out on corners. He just got mental health issues.”

The last inmate homicide at Santa Rita Jail was reported in October. Hours after the incident — which also happened in a maximum-security unit for inmates with mental illness or behavioral problems — Kelly held a news conference for reporters outside the jail.

Why officials didn’t publicly reveal the July 6 killing wasn’t clear. Asked Thursday morning about the death, Kelly and another sheriff’s spokesman, Sgt. J.D. Nelson, said they didn’t know anything about it.

Later, after speaking with jail administrators and reviewing the police report, Kelly said deputies had properly reported the killing to state officials, the Alameda County Board of Supervisors and the sheriff’s investigative division, as required by the department’s protocols.

Kelly said any time there’s a homicide, it should be reported to the public.

“That’s my opinion and belief and best practice,” he said. “As to why a press release wasn’t put out on this one, I wasn’t told to do so.”

Kimberly Veklerov is a San Francisco Chronicle staff writer. Email: kveklerov@sfchronicle.com Twitter: @kveklerov