Judge David L. Bunning also ordered Davis not to interfere when her deputy clerks issue marriage licenses.
Bunning, who held Davis in contempt and ordered her into custody, said he was satisfied that the Rowan County Clerk's Office is now complying with a Supreme Court decision that made same-sex marriage legal in all the United States.
Shortly thereafter, and after nearly a week in jail, Davis was released.
"Kim Davis is free," GOP presidential candidate Mike Huckabee told a crowd gathered outside the Carter County Detention Center in Grayson, Ky.
About an hour later, Davis came out of the detention center and stepped on the stage.
She cried as the crowd cheered for her.
"I love you all so much," she said. "We serve a living God. ... Keep on pressing. Don't let down because he is here."