BERLIN (AP) — German authorities have thwarted a plot by a Tunisian man who created the deadly toxin ricin using castor bean seeds and planned to use the poison in an Islamic extremist attack in Germany, federal prosecutors said Thursday.

Sief Allah H., whose last name wasn’t given in line with German privacy laws, was taken into custody Tuesday during a raid on his apartment in Cologne. The 29-year-old was formally arrested Wednesday after a judge reviewed the evidence.

Authorities are still investigating exactly how the suspect planned to use the toxin, but said he was working on a “biological weapon” attack in Germany.

“We don’t know how, or how widely, the ricin was to have been distributed,” said prosecutors’ spokesman Markus Schmitt.

The suspect is believed to have begun procuring material online in mid-May, prosecutors said. He succeeded in creating the toxin this month and investigators found it in the apartment search.

Prosecutors wouldn’t say how much ricin the suspect had produced.

In this Tuesday June 12, 2018 photo, German police officers in protective gear leave an apartment building during an operation in Cologne, Germany. (David Young/dpa via AP)

The seeds of the castor bean plant are naturally poisonous and can be used to create ricin. The substance kills the body’s cells by preventing them from creating protein. A few milligrams are enough to kill an adult if it’s eaten, injected or inhaled. Early symptoms include chest pain, breathing difficulties and coughing.

The suspect is not known to have been a member of a terrorist organization but did have contacts with extremists, Schmitt said.

“He had contacts with people in the jihadist spectrum,” Schmitt said, but would not elaborate on whether those contacts were online, in person or both.

He also would not comment on a report in the top-selling Bild newspaper that American intelligence tipped off German investigators after they detected the suspect’s online activity buying the seeds to make ricin.

Bild also reported that the suspect bought bomb-making materials and chemicals used in the production of ricin. It said the suspect lived in the Chorweiler neighborhood of Cologne with his wife, a convert to Islam, and four children. He supposedly used instructions to make a ricin bomb that had been posted online by the extremist Islamic State group.

His wife was initially taken into custody but was later released, prosecutors said.