A judge sentenced an Iowa man to six years in federal prison on Wednesday for sending a series of threatening tweets to Sen. Joni Ernst (R-IA).

Authorities said Joseph Hilton Dierks, 34, of Waterloo sent Ernst a series of threatening tweets in August, including one suggesting he would shoot the U.S. senator. The tweet included a link to a 2010 movie about a man fatally shooting a woman in the head.

Once the tweet was posted, U.S. Capitol Police got in touch with the Waterloo Police to dispatch officers to Dierks’s home. The responding officers said the suspect “promised to tone it down.”

Twenty-four hours later, Dierks continued sending threatening messages, authorities said.

At Dierks’s sentencing in Cedar Rapids’ federal courthouse, a judge outlined his criminal history for offenses, such as harassing a Waterloo police officer and carrying weapons. In addition to serving six years in federal prison, Dierks will be required to serve three years of supervised release, and probation officials will monitor his computer activity.

The U.S. senator from Iowa has dealt with her share of threats recently. In January, a Nebraska man pleaded guilty to making threatening comments about Ernst in an Iowa motorcycle shop.