LOUISVILLE, Ky. (AP) — A Kentucky judge who raised moral objections to hearing adoption cases involving same-sex couples plans to resign from the bench in a move he hopes will end a disciplinary case against him, according to a document released Thursday.

In his written response to charges that he violated judicial rules, Judge W. Mitchell Nance informed the state's judicial disciplinary commission of his resignation, effective in mid-December. Nance also sent a resignation letter to Gov. Matt Bevin, who will appoint his replacement.

Civil rights advocates had urged Nance's ouster after he declared that "under no circumstance" would a child's adoption by same-sex couples be in the youngster's best interest.

The judge, citing religious objections, filed an order in April that signaled his unwillingness to handle adoption cases involving gay and lesbian adults. Nance hears family court cases in Barren and Metcalfe counties, a rural stretch in south-central Kentucky.

Gay-rights activist Chris Hartman said Thursday that Nance's impending resignation serves as a strong reminder for judges to "do their job or get off the bench."

"I hope it sends a message that fairness and justice must be applied equally," said Hartman, director of the Fairness Campaign, an LGBT advocacy group based in Louisville. "And that judges whose conscience conflicts with their duties must resign the bench if they cannot deliver that basic fairness and justice."

Nance has asked the Kentucky Judicial Conduct Commission to waive any formal hearing and dismiss the charges that he violated judicial canons.

The judge declined to comment when reached by phone Thursday. Nance, 66, was first elected as a district court judge in 2000. He has served as a Family Court judge since 2003, when he was transferred to Circuit Court.

Nance became entangled in the disciplinary case after his April order stating that attorneys should notify court officials if their adoption cases involve gay adults, so he could take steps to recuse himself. He cited a state law requiring judges to disqualify themselves from proceedings when they have a personal bias or prejudice.

Kentucky's chief justice blocked Nance from instituting the procedural change that would have let him avoid handling such cases.

But Nance's actions resulted in the civil rights advocates' complaint to the judicial disciplinary panel. He was charged with violating judicial canons that require judges to maintain high standards of conduct and to act in a manner that promotes public confidence in the judiciary's impartiality.

Nance claimed that his recusal from adoption cases involving same-sex couples would ensure a fair outcome for everyone involved.

"His recusal would have facilitated the impartiality of the judicial system and ensured that all families had a fair opportunity for adoption," his attorney wrote in response to the charges.

The response also lays out the judge's objections to adoptions by gay and lesbian adults. It cites his "sincerely held religious belief that the divinely created order of nature is that each human being has a male parent and a female parent."

Kentucky law allows gay couples to adopt.

The U.S. Supreme Court ruling in 2015 that effectively legalized same-sex marriage nationwide cited adoptions by same-sex couples as "powerful confirmation from the law itself that gays and lesbians can create loving, supportive families."

The ruling also noted that people whose religious doctrines forbid condoning same-sex marriage must be given "proper protection as they seek to teach the principles that are so fulfilling and so central to their lives and faiths."

Nance's defenders had included supporters of Rowan County Clerk Kim Davis, who spent five days in jail for refusing to issue marriage licenses to same-sex couples based on her religious beliefs. A federal judge recently said Kentucky taxpayers still owe nearly $225,000 in legal fees and court costs to the couples who sued the county clerk for refusing to issue marriage licenses because of her opposition to same-sex marriage.