SAN FRANCISCO (CBS SF) — A federal judge heard arguments but deferred ruling Monday on whether a San Francisco political consultant accused of possessing a homemade bomb can be released on bail so that he can receive mental health treatment in a hospital.

U.S. District Judge Vince Chhabria said Ryan Kelly Chamberlain II’s defense lawyer “has credibly argued that this is someone in need of some care that he may not be getting where he is currently housed.”

READ MORE: Vietnam Airlines Launches First Non-Stop Service From SFO To Ho Chi Minh City

But Chhabria said he was also concerned about security measures if Chamberlain is released from jail to an unlocked hospital.

“What matters is if there’s any assurance that defendant is unable to pursue what he was pursuing before,” the judge said at a hearing at the federal courthouse in San Francisco.

Chhabria said he will issue a written ruling later. The hearing was an appeal from a U.S. magistrate’s ruling last month that Chamberlain must be held in pretrial custody because he is both a danger to the public and a flight risk.

Chhabria is the judge who will preside over Chamberlain’s not-yet-scheduled trial.

Chamberlain, 42, is accused of one count of possessing an unregistered destructive device—the alleged bomb found during an FBI search of Chamberlain’s San Francisco apartment on May 31 — and one count of possessing a gun with the serial number removed.

Federal prosecutor Philip Kearney told Chhabria Monday that he expects to obtain a revised grand jury indictment by the end of the month with an additional charge “based on positive tests for a toxin.”

Kearney did not identify the toxin at the hearing. But in a brief filed on Friday, he alleged that powder residue found in vials hidden inside two mini-flashlights seized from Chamberlain’s apartment has now “tested positively for the lethal toxin abrin.”

Small doses of abrin are lethal to human beings if inhaled, ingested or injected, according to prosecutors.

Kearney, an assistant U.S. attorney, argued that Chamberlain “is a very dangerous individual based on what was found in his possession” and should be denied bail.

READ MORE: Gov. Newsom Enlists California Highway Patrol To Help Stop Smash And Grab Robberies

Assistant Federal Public Defender Jodi Linker told the judge that two doctors, in reports that have not been released to prosecutors, concluded that Chamberlain needs mental health treatment.

Linker told the judge that Chamberlain is being held at San Francisco jail’s San Bruno facility.

She proposed that if granted release to a hospital, Chamberlain would be subject to electronic monitoring and to searches at any time, would be denied mail, would have all visitors monitored and would not be allowed to check out of the hospital voluntarily.

In a brief filed last week, Linker said Chamberlain’s mother from Iowa and two uncles from Florida and Colorado have offered to post property as bond.

Linker said she hopes Chamberlain could be treated at the Langley Porter Psychiatric Hospital of the University of California at San Francisco.

If Chhabria agrees to grant bail, Linker said, she would then make arrangements with Langley Porter or another facility and present the details about security to Chhabria for review at another hearing before Chamberlain would be released.

Prosecutors have alleged that bomb materials found in Chamberlain’s apartment included a glass jar containing batteries, pyrotechnic powder and a rocket motor; ball bearings and screws believed to be intended as shrapnel; an ignition device; and a circuit board configured as a remote-controlled receiver.

At a hearing before U.S. Magistrate Nathaniel Cousins last month, Kearney argued the mechanism was a “fully functioning, self-contained destructive device” that was “ready to go.”

Chamberlain has been in custody since his arrest near Crissy Field in San Francisco on June 2 following a nationwide manhunt that began after the May 31 search of his Nob Hill apartment.

MORE NEWS: COVID: Omicron Variant Has Some Bay Area Families Revising Holiday Travel Plans

Chamberlain, guarded by U.S. marshals, appeared in court Monday in orange jail clothing with a small chain shackle at his ankles.