GRAYSON, Ky. — After five nights in jail for refusing to issue marriage licenses to same-sex couples, Kim Davis, a Kentucky county clerk, walked free Tuesday to a roar of cheers from thousands of supporters, but she and her lawyer would not say whether she would continue to defy court orders and try to block the licenses.

Outside the jail here, a planned demonstration by people who, like Ms. Davis, say that same-sex marriage violates their religious beliefs turned buoyant when she was released, the sense of triumph mixed with a dose of presidential politics.

She walked onstage to thunderous applause, the song “Eye of the Tiger” playing on loudspeakers, her hands held aloft by one of her lawyers, Mathew D. Staver, and Mike Huckabee, a Republican presidential candidate and former Arkansas governor. Another Republican presidential contender, Senator Ted Cruz of Texas, was also in attendance but largely overshadowed.

Ms. Davis broke down in tears and spoke only briefly, not addressing the issues in her case.

“I just want to give God the glory,” she told the crowd, some waving white crosses. “His people have rallied, and you are a strong people. Just keep on pressing. Don’t let down. Because he is here.”