RUTLAND — A prison inmate accused of sending threatening letters to President Barack Obama and Gov. Peter Shumlin has been sentenced to more than four years in federal prison.

Dakota Gardner, 22, sent the letters last year while incarcerated on a 2009 assault charge at the Southern State Correctional Facility in Springfield.

Gardner apologized in court Monday for sending the letters. A judge last year sealed the records on the basis that the threats described were too gruesome and inflammatory to be made public.

Gardner said that when he wrote the letters, he was about to get out of jail and figured he would be put back in prison if he made the threats. He said he didn’t have the control to be out in the community.