Arizona Senator John McCain, a Republican, said over the weekend that he agrees with Kentucky county clerk Kim Davis.

Davis earlier this month spent five days in jail for refusing to comply with the Supreme Court's summer ruling striking down gay marriage bans in all 50 states. Davis said that issuing marriage licenses to gay and lesbian couples would violate her conscience.

Speaking to reporters at the Values Voter Summit, McCain said that Davis was right to “exercise the dictates of her conscience.”

“I think she was right in that she can exercise the dictates of he conscience and everyone should respect that,” McCain said. “I do not believe that therefore she should violate the law. She should have just said, 'I refuse to do it.' Just like Hobby Lobby case, which we won, because those people were allowed to exercise their religious beliefs by the United States Supreme Court.”

“You think that Kim Davis could say, 'I don't want to perform this?'” a reporter asked.

“Yes,” McCain answered.

Davis was honored Friday for her actions at the annual conference of Christian leaders.

(Related: Kim Davis honored at FRC's Values Voter Summit.)