In the first ruling of its kind in the state, a Knox County judge has granted a woman the legal rights of a husband.

The ruling came as the state Legislature was pushing through a bill designed to stop 4th Circuit Court Judge Greg McMillan - and any other judge in Tennessee - from making that very decision, court records show.

In a reversal from his decision last year, McMillan last week penned approval of a divorce for same-sex couple Sabrina Witt and Erica Witt that includes designation of Erica Witt as the father of the couple's daughter, conceived through artificial insemination.

Days later, Gov. Bill Haslam signed into law a bill inspired by the Witts' case - the first in the state in the wake of a 2015 U.S. Supreme Court decision that conferred marital rights to same-sex couples. The bill ordered courts to give "natural meaning" to words such as mother and father.

► Related:Lawsuit challenges Tennessee's days-old 'natural meaning' law

Attorney General Herbert Slatery III already had opined that judges would - and should - ignore the new law in such family law proceedings as divorce, custody and child support. The Legislature ignored the opinion.

Same-sex couple wed, split

Erica Witt and Sabrina Witt legally wed in Washington, D.C., in April 2014, bought a home in Knoxville and decided to have a child via artificial insemination from an anonymous donor. Sabrina Witt bore a baby girl as a result in January 2015. Because Tennessee did not then recognize same-sex marriage as legal, Erica Witt's name was not placed on the baby's birth certificate. Their marriage became legal in Tennessee when the U.S. Supreme Court in June 2015 gave gay people the right to marry - and to divorce.

In February 2016, Sabrina Witt filed for divorce. Her attorney, John Harber, argued the law on custody rights in artificial insemination cases in Tennessee used the term "husband." He said the natural meaning of that word is a man, so Erica Witt didn't qualify. McMillan agreed.

But Erica Witt's attorney, Virginia Schwamm, filed a challenge to the constitutionality of the law since it was passed decades before the same-sex ruling and now runs afoul of it.

The Legislature swung into action. The "natural meaning" bill was drafted to ban the legal labeling of a woman as a husband, and 53 legislators used a conservative legal group to try to step into the Witts' divorce case.

McMillan, though, was having none of that. He refused in an April order to allow such an intervention, saying the Legislature needs to stay out of the court's and the Witts' business.

"The court finds that the current request to intervene constitutes an attempt to bypass the separation of powers provided for by the Tennessee constitution," McMillan wrote. "The parties and the child deserve to have their issues tried and a ruling made."

Tennessee AG's office weighs in

Because Schwamm was seeking to strike down entire sections of family law, Slatery's office had the legal duty to step into the case. Sara Sedgwick, senior counsel for the health care division of the office, urged McMillan in a brief to view the words "wife" and "husband" in a "gender-neutral" fashion. To do otherwise, she wrote, would be to violate constitutional law, particularly in light of the same-sex marriage decision.

McMillan took her advice.

"... The court finds that that is the correct frame of reference that the court should use in looking at this issue based on the duty of this court to preserve the statute's constitutionality if it can be read in a neutral fashion," he said in a transcript from a March hearing.

Stripping away gender from the label of husband, McMillan said Erica Witt was a legal father with legal rights to see her daughter. She also has to pay child support.

"Erica Witt is a legal parent of the parties' minor child," McMillan wrote.

The 53 legislators who sought to intervene have filed a notice of an intent to appeal McMillan's refusal to let them.