SAN FRANCISCO — The essential ingredients of a remote-controlled improvised explosive device were allegedly found together in a messenger bag during a search of a public relations consultant’s San Francisco apartment, according to an FBI affidavit unsealed today.

FBI Agent Michael Eldridge wrote in the affidavit that bomb technicians who examined the materials found in the home of Ryan Kelly Chamberlain II on Saturday believed they constituted an illegal destructive device “designed to maim or kill a human being or human beings.”

Chamberlain, 42, was arrested in San Francisco on Monday evening after a nationwide manhunt that followed an FBI search of his apartment near Polk and Jackson streets in the city’s Nob Hill neighborhood Saturday.

The affidavit and a federal criminal complaint charging him with possession of an illegal destructive device were unsealed after his initial court appearance before a federal magistrate in San Francisco this morning.

Eldridge wrote in the affidavit that the items found in the bag on the floor of Chamberlain’s apartment included a screw top glass jar containing batteries, a powdery green substance believed to be explosive material and a model rocket motor.

Other items were an electric igniter of a type commonly used for improvised explosive devices; an assortment of ball bearings and screws believed to be intended as projectiles, a wire extending from the lid of the jar; and a circuit board configured as a remote-controlled receiver, Eldridge wrote.

“I am informed by the FBI bomb technicians who analyzed the device that the insertion of the model rocket motor into the green powdery substance is significant, since rocket motors are known to ‘burn’ at extreme temperatures, creating an efficient method of fully igniting explosive material,” Eldridge wrote.

The documents also provided more details about Chamberlain’s disappearance on Saturday.

Eldridge wrote that as a law enforcement team approached the apartment, Chamberlain was seen leaving with a woman and drove away with her.

When Chamberlain returned on foot 30 minutes later, Eldridge identified himself and “invited Chamberlain to talk in a nearby coffee shop,” the agent wrote.

During that conversation, Chamberlain “admitted that he was aware of the Tor network and that he sometimes played poker on ‘black market’ websites” and admitted that his laptop was inside the apartment, Eldridge said.

The Tor network is computer software that enables online anonymity.

“After a short interview, Chamberlain was allowed to leave the coffee shop at his request,” the agent wrote.

Chamberlain then entered his personal vehicle and was followed by surveillance teams that observed him “driving in an apparent intentionally reckless manner at a high rate of speed, failing to stop at posted lights and signs,” Eldridge said.

The affidavit does not say what happened next and says that Chamberlain’s whereabouts were unknown at the time the document was prepared.

The affidavit says that agents searching the apartment also found a tool box on a kitchen shelf that contained “apparent additional IED components similar to those used in the messenger bag device,” including wires and a device known as a ‘clothespin switch.’

The affidavit says an open laptop was found on the kitchen table within arm’s reach of the messenger bag, but does not give any further details.

On Sunday, FBI officials announced that Chamberlain was wanted on suspicion of possessing explosives and said he should be considered armed and dangerous.

Chamberlain on Monday posted what appeared to be a suicide note on social media detailing his struggles with depression and trouble with family and work. He then posted a follow-up note saying he was not armed and dangerous and that “no one was ever in danger.”

At a news conference this morning, San Francisco police Chief Greg Suhr said Chamberlain appeared to have been “a very dangerous and desperate person.”

At Chamberlain’s initial court appearance later this morning, U.S. Magistrate Nathaniel Cousins informed him of the charges and scheduled a status conference for Wednesday and a detention hearing for Thursday.

Chamberlain will remain in custody until then and faces up to 10 years in prison if convicted of the charge.