A British software programmer has been sentenced to eight years in prison for trying to buy the deadly toxin ricin over the Internet.

Mohammed Ali was convicted in July of attempting to possess a chemical weapon. He admitted trying to buy ricin, but claimed he was motivated by curiosity after it featured on the TV show "Breaking Bad."

Ali, who is 31, contacted a U.S. seller about buying 500 milligrams of ricin — enough to kill hundreds of people — for $500. The contact was an undercover FBI agent, and Ali was arrested in February after he was sent a toy car containing a harmless powder.

Judge John Saunders said Friday that Ali's sentence was intended to send a message "that the possession of a chemical weapon is extremely serious."