Democratic candidate Hillary Clinton told supporters Wednesday that jail was the "right thing" for the Kentucky clerk who refused to grant gay couples marriage licenses. While in Iowa for a campaign rally, the former secretary of state was asked how she would respond to someone who did something "like what Kim Davis did recently."

"I think what happened to Kim Davis was the right thing," Clinton said. "She violated the law, and therefore she was arrested. And when she was released, she had to agree that she would not stand in the way of doing her public duty under the Constitution. So I actually think that she was treated as she should have been treated."

Clinton said that even though people are entitled to their beliefs, this does not enable them to break the law. "When you take an oath to uphold the Constitution of the United States, that is your job," she said. "You either enforce the law or you resign from your public position. That is exactly what should have happened."

Speaking at Cornell College in Mount Vernon, Iowa, Clinton explained that the case paralleled that of former Gov. Orval Faubas, who in 1957 used the National Guard to stop African Americans from attending Little Rock Central High School in Arkansas, where her husband later became governor.

“Orval Faubas was the governor who said, ‘We’re not going to obey the Constitution, Brown v. Board of Education and integrate our schools, and I’m doing it because I don’t think it’s right and it’s not what I was elected to do, so we’re gonna stop it,'” Clinton said. “No -- you are part of the United States of America. Whether you agree with a decision or not, we have the rule of law. You have to follow the law.”

Clinton has addressed Davis' case before but has refrained from referring to her by name. "Marriage equality is the law of the land. Officials should be held to their duty to uphold the law -- end of story," she tweeted Sept. 3 with a link to news that a judge had ordered Davis to go to jail.

Davis spent five days in jail after she refused to issue marriage licenses to gay couples as a clerk in Rowan County, Kentucky, following the U.S. Supreme Court decision legalizing gay marriage in June.