A Georgetown University student has pleaded guilty to possessing the deadly toxin ricin after allegedly getting inspiration from Breaking Bad - where it is used as a poison.

Daniel H. Milzman, 19, admitted to keeping the substance, which can be used in biological warfare, in his desk drawer in the McCarthy Hall student accommodation at the Washington D.C. campus.

He accepted the charge of having the material without a federally-required registration during a 30-minute plea hearing at a U.S. District Court today, while wearing an orange jumpsuit.

Daniel H. Milzman, 19, admitted to keeping the substance, which can be used as a biological weapon, in his desk drawer inside Georgetown University's McCarthy Hall student accommodation (pictured)

Milzman was arrested in March after telling his friend, a student adviser, he had made the substance in during a school break and had stashed it in his room.

According to the Washington Post, he bought castor beans, the oil of which is used to make the dangerous substance, from a store in Bethedsa, Maryland, where he had lived with his parents.,

The adviser then asked Milzman whether he intended to use it against another student whom he had previously been in a relationship with. But Milzman just shrugged, and his friend left to call the police.

Officers arrived the next day and were led to the package in his drawer.

Law enforcement confirmed that beforehand, Milzman had also searched for ricin-related terms online while watching various episodes of the television show.

During today's hearing, U.S. Attorney Ronald C. Machen Jr. said: 'Daniel Milzman put himself and others in danger by cooking up a deadly poison. He is very lucky that none of his fellow students were hurt.'

The charge carries a penalty of a fine of up to $250,000 and a prison term of up to five years.

However prosecutors and defense attorneys have reportedly agreed to recommend a sentence of one to two years, plus three years supervised release.

Ricin is a naturally occurring protein derived from the beans of the castor oil plant. It can be deadly if it is inhaled or injected.