Former Arkansas governor and 2016 presidential contender Mike Huckabee said Tuesday that he would be willing to go to jail in the place of Kim Davis, the county clerk who was imprisoned for refusing to issue same-sex marriage licenses.

"Lock me up if you think that's how freedom is best served, because folks, 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," Huckabee said. "But I'm not willing to spend one day under the tyranny of people who believe they can take our freedom and conscience away."

Huckabee stood alongside Davis and her attorney as she was released from the Carter County Detention Center in Grayson, Kentucky.

Get Breaking News Delivered to Your Inbox

Speaking to reporters outside the detention center, Huckabee called Davis a "brave lady" who was willing to go to jail for what she believed.

Huckabee's offer to go to jail in Davis' place came when he was asked what he would advise her to do if she returns to work and is asked to issue licenses to same-sex couples.

"I'm tired of watching people being just harassed because they believe something of their faith, and we cannot criminalize the Christian faith or anybody's faith in this country," Huckabee said.

Davis spent five days behind bars for refusing to issue marriage licenses to gay couples. The federal judge who sent her to prison lifted the contempt order against Davis Tuesday, saying he was satisfied that five of Davis' six deputy clerks had agreed to issue marriage licenses to same-sex couples while she was in prison. Her son, Nathan Davis, who is a deputy clerk, has also refused to grant licenses.

She was released on the same day Huckabee planned a rally outside the detention center, and Davis was met by hundreds of supporters carrying crosses and protest signs outside. Davis stood hand-in-hand with Huckabee, her attorney and her husband as she thanked the crowd for their support.

Huckabee wasn't the only 2016 presidential candidate championing Davis' cause in Kentucky. Sen. Ted Cruz, R-Texas, met with Davis in the detention center just after the judge ordered her release.

"Praise God that Kim Davis is being released. It was an outrage that she was imprisoned for six days for living according to her Christian faith. Fundamentally wrong, and contrary to KY's RFRA law," Cruz wrote on Facebook, referencing Kentucky's Religious Freedom Restoration Act (RFRA).