An Oregon man who made threats to kill former President Barack Obama over social media will serve five years in federal prison.

The Mail Tribune reported Friday that U.S. District Court Judge Michael McShane sentenced 62-year-old John Roos of Medford to 63 months in prison.

RELATED: German police uncover intricate military assassination plot

Roos was also sentenced to three years of post-prison supervision upon his release.

According to a U.S. Department of Justice news release, Roos pleaded guilty to charges related to the threats and other charges for possession of an unregistered explosive device.

Roos said in court that he threatened to kill Obama and the former first family on Twitter. According to the release, Roos had also posted threats to kill FBI agents with hunting rifles on Facebook.

Roos has said the threats were not serious.

A man who threatened to kill Barack Obama on social media has been sentenced to years of hard time Facebook/@john.roos.7982 L: Scott Olson/Getty Images