An Iowa man was sentenced Wednesday to six years in a federal prison for posting threatening Twitter messages directed at U.S. Sen. Joni Ernst.

Joseph Hilton Dierks, 34, of Waterloo, sent Ernst several threatening tweets in August, including one that suggested he would shoot her, authorities said. That message included a link to a 2010 movie in which a man fatally shoots a woman in the head.

After the tweet was posted, U.S. Capitol Police contacted the Waterloo police, and officers sent to Dierks’ home said he promised to “tone it down.”

State Sen. Joni Ernst speaks to supporters at a primary election night rally after winning the Republican nomination for the U.S. Senate.

U.S. Sen. Joni Ernst, R-Iowa.

(Associated Press)

But Dierks resumed posting threatening messages within 24 hours, authorities said.

At the sentencing in Cedar Rapids, a judge notedDierks’ criminal history, which includes a prior conviction for harassing a Waterloo police officer and carrying weapons.

In January, a Nebraska man pleaded guilty to threatening Ernst.

That suspect, identified as Robert William Simet, 64, of Omaha, was arrested last July after employees of an Iowa motorcycle shop told the FBI that Simet had made threatening comments about Ernst.

Robert Simet is shown in an undated photo provided by the Pottawattamie County (Iowa) Sheriff's Office. A psychiatric evaluation has been ordered for Simet, accused of threatening Republican U.S. Sen. Joni Ernst of Iowa. U.S. Magistrate Judge Helen Adams on Tuesday, July 18, 2017, ordered the transfer of Simet from Pottawattamie County Jail in Council Bluffs, Iowa, to the Douglas County Jail in Omaha, where he'll be held while undergoing an evaluation.  (Pottawattamie County (Iowa) Sheriff's Office via AP)

In January, Robert William Simet, 64, of Omaha, Neb., pleaded guilty to making threats against U.S. Sen. Joni Ernst.

Ernst, a Republican, has been in the U.S. Senate since January 2015. She previously served as an Iowa state senator.

The Associated Press contributed to this story.