Republican presidential candidate Mike Huckabee on Tuesday volunteered to take Kentucky clerk Kim Davis' place in jail.

Davis, the elected clerk of Rowan County, was freed from jail on Tuesday after serving five days for refusing to comply with a federal judge's ruling ordering her to issue marriage licenses to all qualified couples. Davis, an Apostolic Christian, has said that issuing marriage licenses to gay and lesbian couples would be a violation of her conscience.

(Related: Kim Davis won't say whether she'll abide by order in gay marriage dispute.)

Speaking at a rally in support of Davis, Huckabee, a former governor of Arkansas, said that he is willing to spend eight years in jail.

“I have a message for the judge,” Huckabee told the crowd, “and I say this with all my heart: If this judge believes that somebody must be put in jail because a person is willing to stand on the biblical definition of marriage ... Let Kim go, but if you have to put someone in jail, I volunteer to go. Let me go. Lock me up if you think that's how freedom is best served.”

“I am willing to spend the next eight years in the White House leading this country, but I want you to know, I'm willing to spend the next eight years in jail but I'm not willing to spend one day under the tyranny of people who believe they can take our freedom and conscience away!”

During a television interview over the weekend, Huckabee sided with Davis, saying that she was fighting “judicial tyranny.”