GRAYSON, Ky. (AP) -- The Kentucky county clerk jailed for refusing to issue marriage licenses to gay couples was released Tuesday after five days behind bars, emerging to a tumultuous hero's welcome from thousands of supporters waving large white crosses.

"I just want to give God the glory. His people have rallied, and you are a strong people," Kim Davis told the crowd after stepping outside, her arms raised like a victorious boxer, to the blaring "Rocky"-sequel theme song "Eye of the Tiger."

Her lawyer refused to say whether she would defy the courts again.

"Kim cannot and will not violate her conscience," said Mat Staver, founder of the Liberty Counsel, the Christian law firm representing Davis. As for whether she will issue licenses, Staver said only: "You'll find out in the near future."

The Rowan County clerk whose defiance has made her a hero to the religious right walked free after the federal judge who ordered her locked up lifted the contempt ruling against her, saying he was satisfied that her deputies were fulfilling their obligation to grant licenses to same-sex couples in her absence.

But U.S. District Judge David Bunning also warned Davis not to interfere again, or else she could wind up back in jail.

Davis, 49, has refused to resign her $80,000-a-year job. As an elected official, she can lose her post only if she is defeated for re-election or is impeached by the state General Assembly. The latter is unlikely, given the legislature's conservative slant.

As the surprise news of her impending release spread, a crowd of dozens of supporters who had gathered on the jailhouse lawn for a previously scheduled rally swelled to thousands. They broke into "Amazing Grace" and "God Bless America" and waved signs, flags and crosses.

Cries of thanks to Jesus echoed through the crowd as Davis emerged next to Republican presidential candidate Mike Huckabee and her husband, Joe, who was in overalls and a straw hat. Huckabee and fellow GOP White House candidate Sen. Ted Cruz visited her at the jail just after the decision came down.

"If somebody has to go to jail, I'm willing to go in her place," said Huckabee, a former Baptist minister and Arkansas governor. "She has shown more courage than any politician I know."

Natalie Ferguson, who came to the rally from Elora, Tennessee, said: "We have to stand because if we sit back and be quiet, you know then as a Christian community we're going to get run over."

Davis was locked up on Thursday for the boldest act of resistance by a public official yet to the U.S. Supreme Court ruling in June that effectively legalized same-sex marriage across the nation. Citing "God's authority" and her belief that gay marriage is a sin, Davis, an Apostolic Christian, stopped issuing all marriage licenses.

Two gay couples and two heterosexual ones sued her. Bunning ordered Davis to issue the licenses, and the Supreme Court backed him. But she still refused and was held in contempt of court and hauled off to jail in handcuffs, igniting protests from religious conservatives. They rallied for days at her office, at the jail and outside the judge's home.

The timing of her release after just five days came as something of a surprise. Last week, Bunning said that he might reconsider his decision to jail her in a week.

Five of Davis' six deputy clerks - all except her son, Nathan - agreed to issue licenses to gay couples with Davis behind bars. In lifting the contempt order, Bunning asked for updates on the clerks' compliance every two weeks.

On Tuesday, Staver, Davis' lawyer, maintained that the licenses issued by her deputies are invalid. But the Kentucky attorney general's office said it believes otherwise.

Dan Canon, an attorney for the couples who sued, said they will ask the judge to again hold Davis in contempt if she returns to work and blocks her deputies from dispensing licenses.

"We are hoping she is going to comply with it. We'll have to see," Canon said. "But if experience is a teacher, Ms. Davis just doesn't believe that court orders apply to her."

Davis' dispute has offered some of the GOP presidential candidates an opportunity to appeal to the party's evangelical Christian wing, which opposes gay marriage and has cast her jailing as an issue of religious freedom.

On Monday, her lawyers took their case to a federal appeals court, asking that she be allowed to remove her name and title from marriage certificates issued in Rowan County so that she would not have to act against her conscience.

Gov. Steve Beshear, a Democrat like Davis, reiterated Tuesday that he will not call a special session of the legislature to overhaul the marriage-licensing process by taking it out of the hands of county officials and making it a state function.

"Hopefully we can move forward now. We need to be thinking about so many things about the future of Kentucky," he said.

Casey County Clerk Casey Davis, who recently bicycled more than 400 miles across Kentucky in solidarity with Kim Davis, called her jailing a "total injustice." He is not related to her.

He said he is not issuing any marriage licenses, and suspects the conflict could come to his county next. He said only one same-sex couple has inquired about a license in his county and was told there were no licenses being issued, and that's the last Davis heard from them.

He said he, too, would be willing to go to jail.

More From KROC-AM