MOREHEAD, Ky. (AP) – A gay couple walked out of a Kentucky clerk’s office with a marriage license, hours after the county’s defiant clerk was hauled to jail for refusing to license same-sex marriages.

William Smith Jr. and James Yates, a couple for nearly a decade, were the first to receive a marriage license Friday morning in Rowan County, ending a months-long standoff.

Clerk Kim Davis has cited “God’s authority” and refused to issue marriage licenses since the Supreme Court effectively legalized gay marriage in June. She defied a series of court orders.

Deputy clerk Brian Mason issued the license Friday morning, congratulating the couple and shaking their hands as he smiled. The couple embraced and cried.

RELATED CONTENT Judge orders defiant Kentucky clerk to jail

Copyright 2015 The Associated Press