By Elizabeth Daley

(Reuters) - A Pennsylvania man was sentenced to 20 to 40 years in prison on Monday for sending a ricin-laced scratch-and-sniff birthday card to a romantic rival and making continued threats from behind bars, a prosecutor said.

Nicholas Helman, 20, of Hatboro, a Philadelphia suburb, had previously pleaded guilty to attempted murder, risking a catastrophe and other charges for trying to poison his ex-girlfriend's new boyfriend with the lethal inhalant.

After he was jailed, he was accused of seeking to have a fellow inmate "kidnap witnesses, rip their eyes out, burn their homes down and kill family members," Bucks County Deputy District Attorney Robert James said.

On Monday, he pleaded guilty to additional felony charges tied to threatening witnesses, the prosecutor and the head detective working on his case, James said.

Helman was originally arrested after police, acting on a tip from one of Helman's co-workers, intercepted the card laced with ricin, which is made from castor beans. Helman had placed the card in the mailbox of rival Jake Palm of Warminster in March 2014, prosecutors said.

Investigators raided Helman's home and found a backpack containing castor beans and other materials believed to have been used to make the poison, prosecutors said.

The former Eagle Scout was caught, according to court documents, after he bragged to a co-worker at a local retail store about rubbing ground castor beans onto a scratch-and-sniff birthday card.

Helman told police he was only trying to frighten his ex's new beau as part of a scheme to win her back, according to a police affidavit.

"The defendant is a person of above average intelligence," James said, "it's not everyone who can make ricin successfully, that is why we believe he is a danger to the community."

Helman was in Bucks County Jail awaiting transfer to prison, according to Bucks County Court of Common Pleas Judge Alan Rubenstein.

Helman's lawyer, Joseph Haag, could not be reached for comment.

(Reporting by Elizabeth Daley in Pittsburgh; Editing by Barbara Goldberg and Sandra Maler)