Kentucky's governor told a county court clerk Thursday that he should either issue marriage licenses to same-sex couples or resign.

But Casey Davis, who is elected, said he would go to jail first.

"If that's what it takes for me to express the freedom of religion that I believe I was born with, I'm willing to do that," Davis, dressed in a suit and smiling with his wife beside him, told reporters after his meeting with Gov. Steve Beshear.

Beshear spokesman Terry Sebastian later confirmed that the governor had indeed urged Davis to comply with the law.

Davis, the Casey County court clerk, is one of the local elected officials across the country who have cited religious beliefs in refusing to comply with the U.S. Supreme Court's ruling last month legalizing same-sex marriages nationwide. Their stance has prompted a debate about whether religious liberty extends to those officials, who are charged with carrying out state government functions.

Beshear, a Democrat, fought to preserve Kentucky's ban on same-sex marriages, even hiring private attorneys to defend it after the state's Democratic attorney general declined to do so. But Thursday, Beshear offered his strongest statement yet that Davis, and others who share his beliefs, must follow the law.

"When he was elected, he took a constitutional oath to uphold the United States Constitution," Beshear said in a news release. "One of Mr. Davis' duties as county court clerk is to issue marriage licenses, and the Supreme court now says that the United States constitution requires those marriage licenses to be issued regardless of gender."

But Davis and others say they cannot be forced to do something that violates their religious beliefs. As he met with Beshear in his office Thursday, about 50 of his friends and family stood outside praying in the Capitol Rotunda. Davis left the meeting saying the two had "agreed to disagree."

The issue of religious freedom will be before U.S. District Judge David Bunning on Monday when he hears arguments in another case involving Rowan County Clerk Kim Davis. She refused to issue marriages licenses to two gay couples and two straight couples after the Supreme Court's ruling, prompting the American Civil Liberties Union to seek an injunction forcing her to do it.

If a court was to issue such an injunction and Kim Davis or Casey Davis defied it, they could be thrown in jail. But removing them from office would be difficult: As elected officials, they would have to be impeached by the General Assembly, which is unlikely.

"The rest of the county court clerks are complying with the law regardless of their personal beliefs," Beshear said in a statement. "The courts and the voters will deal appropriately with the rest."

Lawrence County Clerk Chris Jobe, president of the Kentucky County Clerk's Association, announced earlier this week that 57 clerks had signed a letter to Beshear asking him to call a special session of the state legislature to change Kentucky's marriage laws to protect local officials who object to same-sex marriage. But as of Thursday afternoon, the governor's office had only received three such letters: Kenny Brown in Boone County, Kim Davis in Rowan County, and Jason Denny in Anderson County.

Beshear said again on Thursday that he would not call the legislature back into session. And Casey Davis reiterated Thursday that he would not resign, saying he would not quit on his family or the people that elected him.

"I'm going to be not wise in mine own eyes," he said, referencing a passage from the book of Proverbs in the Bible. "I'm going to fear the Lord and depart from evil."