The first same-sex couple has been granted a marriage licence in Rowan County since the supreme court legalised gay marriage, one day after a defiant clerk was sent to jail for refusing to issue such licences, The Guardian reports. James Yates, 41, and William Smith Jr, 33, locked hands and entered the office of clerk Kim Davis at around 8.05am on Friday. It was the sixth time the couple, from Morehead, had attempted to get a license.

Surrounded by a gaggle of reporters, Yates and Smith obtained their license from deputy clerk Brian Mason – one of the deputies who told a judge yesterday that they would comply with his order to carry out the marriages following the jailing of Davis for refusing to do so.

As the couple exited the clerk’s office – a site that has become a focal point for religious conservatives across the US who are opposed to same-sex marriage – a man shouted to the crowd outside: “They got it!” Supporters of Davis broke out in a repeated chant of “love has won”.

Yates told reporters he was “relieved and happy” about the turn of events. In recent days, Davis’s office has declined to issue licenses to several couples, including Yates and Smith, despite an order from the US supreme court mandating otherwise. Asked why it was important for them to receive their license in Rowan county, Smith told the Guardian: “This is where we live.”

Yates said they currently had two dates in mind to tie the knot, but had yet to firm up plans. Asked if they expected getting the license to go smoothly, Smith told the Guardian: “We were hoping it would.” Before the clerk’s office opened its doors, Davis’s husband, Joe, jeered the same sex marriage proponents and held a sign that said: “Welcome to Sodom + Gomorrah.”

“It ain’t nothing about licenses … it’s about persecuting Kim,” Mr Davis said of the clerk’s opposition. His wife is in “high spirits”, he told the Guardian, and she’s willing to stay in jail “as long as it takes”. For Davis to be released, she will either have to resign, or agree to allow licenses to be issued. The issuing of the first same-sex marriage licence came a day after a federal judge placed defiant clerk Davis into the custody of US marshals for denying an order to issue marriage licences.

In a winding five-hour hearing on Thursday, five of six Rowan County deputies at Davis’s office told US district judge David Bunning they would comply with his order – grudgingly, in some cases, with one saying it was the “hardest thing” to have to do. The judge said they were free to follow the law despite the contention of Davis’s attorneys that they could not act without Davis’s consent. Only the clerk’s son, Nathan, refused to comply.

The judge then ordered her to remain in custody. Davis was escorted through the back of the US district courthouse in Ashland and taken in an SUV to Carter County jail, where she was booked at 5.32pm. Bunning emphasized his court has authority over the matter, saying he “expects compliance” from Davis’s deputies. Attorneys disputed whether the marriage licenses would be valid without Davis’s consent; however two couples named as plaintiffs in the suit against Davis said they would seek licenses as early as Friday.

Despite the spotlight in recent days on the lifelong bureaucrat and Morehead resident, the incarceration of Davis doesn’t cap her intense legal battle. The clerk’s handling of marriage licenses has put her at the center of a firestorm surrounding an issue that divides not only her hometown of Morehead, but the state of Kentucky. Davis is one of three clerks in Kentucky who have refused to issue marriage licenses despite the supreme court’s 26 June order legalizing same-sex marriages. Rand Paul, the US senator from Kentucky and 2016 presidential hopeful, said it was “hard to argue that government’s involvement in marriage has made it better, a fact also not surprising to those who believe government does little right”.

But no public official – including Davis – was above the law, said Josh Earnest, the White House press secretary. “Certainly not the president of the United States, but neither is the Rowan County clerk. “On principle, the success of our democracy depends on the rule of law.” Early on in Thursday’s hearing Davis, an Apostolic Christian, took the stand to argue why she shouldn’t be jailed. It was, her attorneys argued, a “factually impossible” order to follow.

Davis’s attorney Roger Gannam asked the clerk about the day she found God. Davis broke down in tears and faintly replied: “I did a lot of wicked things in my time.” When Gannam asked for her definition of marriage, she responded: “Marriage is a union between one man and one woman.” Asked if she was capable of believing otherwise, Davis said: “No.”

Bunning wasn’t swayed. After listening to testimony from Morehead resident April Miller, one of the plaintiffs in the case, he declared: “The court finds that the plaintiffs have established that [Davis] has and will continue to disobey this court’s order. “She’s failed to establish factually why she can’t comply,” he said; her sincerely held beliefs were “simply … insufficient” as reason to disobey the order.

The plaintiffs’ attorneys had requested financial penalties to coerce Davis into compliance, but Bunning said he “wasn’t convinced” that would suffice. “I’m not going to put a deadline on it,” the judge said of her incarceration. Before exiting the courtroom, Davis turned to Bunning and said: “Thank you, judge.”

Davis’s saga attracted increasing attention last month, when a federal judge ordered her to abide by the supreme court’s June decision to legalize same-sex marriage. Kentucky governor Steve Beshear, a Democrat, has also ordered county clerks across the state to fall in line with the ruling. Tension heightened last week after Davis continued to refuse licenses to couples; on Friday she filed a request to the supreme court to stay a lower court’s decision. Late Monday the high court denied her request in a one-sentence ruling.

Davis, a Democrat, earns $80,000 annually; she took office in January after winning a close election last fall. Bunning’s ruling doesn’t appear to strip her authority as clerk, but her deputies will handle day-to-day duties until Davis agrees to fall in line.

While calls for Davis to be fired have proliferated in recent days, the only means for her removal exist with the Kentucky general assembly, or if she resigns. Davis also faces a potential charge of official misconduct, a misdemeanor that could bring up to a year in jail. A request for a special prosecutor to review the allegations is pending before Kentucky attorney general Jack Donway, a Democrat. Conway’s office declined additional comment on Tuesday.

The order to jail Davis prompted a fierce response outside the courtroom, where hundreds of supporters and opponents of the clerk had gathered. A large group of same-sex marriage proponents chanted and screaming: “Love is not a sin!” as word of the decision trickled outside onto Greenup Avenue. Unlike Davis, her town of Morehead has “many churchgoers” who support equal rights, said Thomas Albert, 25, who waited in line Thursday morning to get a seat in the courtroom.

“Being a Morehead citizen and a taxpayer, I think it’s important she does her job,” Albert told the Guardian. Expectedly, the ruling drew a sharp rebuke from Davis’s supporters and her counsel, the Christian non-profit Liberty Counsel. “Everyone is stunned at this development,” said Mel Staver, founder and chairman of the counsel. “Kim Davis is being treated as a criminal because she cannot violate her conscience. While she may remain behind bars for now, Kim Davis is a free woman. Her conscience remains unshackled.”

The length of time Davis will stay behind bars is – for now – at her own discretion. It’s not rare for someone to be jailed for contempt of court but it’s unusual for people to “refuse to comply with court orders”, said Adam Winkler, a UCLA law professor. “The purpose of contempt is not punitive; the goal is not to punish the person, merely to enforce the court’s order,” Winkler told the Guardian. “The court is trying to gain compliance with its order. Sometimes threatening someone with jail is going to be the only thing that will prompt compliance.”

Winkler said Judge Bunning may have been concerned that Davis could have raised funds to cover any financial penalties he assessed, “and thus the fines would not have their coercive effect”. Davis could remain in jail for years, Winkler said. He recalled a case where an individual jailed for contempt stayed locked up for 14 years. Eventually, he said, a judge will consider whether incarceration will “coerce compliance with the order”.

After a year, the person has “proven they’ll stay in jail forever”, Winkler said, “so judges will often allow someone out of jail, eventually, because they just don’t feel it’s … having the effect.” Attorney Laura Landenwich, who represents the plaintiffs, said it was unfortunate the hearing’s outcome led to Davis’s incarceration but that doesn’t excuse her decision to defy a court order.

“She holds the key to her cell,” Landenwich said. “That’s the reality.”