A Mississippi man has pleaded guilty to sending ricin-laced letters to President Barack Obama and other officials.

According to Reuters, James Everett Dutschke, the man who sent letters to the president and two other public officials, pleaded guilty and agreed to a 25-year jail sentence, the Justice Department announced on Friday.

The Associated Press reported that the judge asked the 42-year-old if he was voluntarily pleading guilty.

"I am voluntarily entering this plea and I understand fully in doing so that I am accepting responsibility for everything," he said.

He also said that the possibility of being convicted by a jury and spending the rest of his life in prison was a deciding factor in the agreement, the AP notes.

Prosecutors have said that Dutschke researched how to make the poison-laced letters online and then created and sent them out. Later, he denied sending the letters and tried to place all the blame on an Elvis impersonator.

A sentencing date has not been set.