An Oklahoma judge who used the Bible as the basis for denying name-change requests by women who had gender-reassignment surgery has been overruled by a higher court.

On two separate occasions, one in 2011 and another in 2012, Oklahoma County District Judge Bill Graves refused to permit two people who were born male to change their names to ones that are traditionally female because doing so “is fraudulent.”

In a baffling ruling in which Graves claimed that it is impossible for anyone to change their gender, he used the Book of Genesis to support his conclusion.

“To grant name change in this case would be to assist that which is fraudulent,” Graves wrote in his 2012 decision denying James Dean Ingram’s request to become Angela Renee Ingram. “It is notable that Genesis 1:27-28 states: ‘So God created man in his own image, in the image of God created he him; male and female he created them.’ The DNA code shows God meant for them to stay male and female.”

Graves made the same argument in 2011, when he refused to permit Steven Charles Harvey to become Christie Ann Harvey.

Fortunately a higher court has mopped up Graves’ messes -- twice. Last week, the Oklahoma Court of Civil Appeals unanimously voted to grant Ingram’s request. The court had previously undone Graves’ misdeed on behalf of Harvey as well.

Graves, who was once a Republican member of the state legislature, said the appeals court’s action is “very disappointing.”

“We can’t change our sex, the way God made us,” Graves said according to the Associated Press. “These things are really counterfeit.”

No surprise there, given Graves’ record of fighting against rights for same-sex couples. While a member of the Oklahoma House of Representatives, Graves pushed a bill in 2004 that would have denied recognition of same-sex marriages. The bill declared that such unions “shall be considered repugnant to the public policy of the state,” the AP said.

Brady Henderson, legal director of the American Civil Liberties Union of Oklahoma and Ingram’s attorney, said correctly that no court should use religion to make decisions.

Henderson told the AP that the case is “much more about a fundamental First Amendment issue. A judge shouldn’t reach any religious issues to make this decision.”

Americans United has said this many times, but apparently it needs to be repeated: U.S. law does not come from the Bible. No court should be issuing rulings based on biblical principles, because that is not what the U.S. Constitution instructs or allows.

It’s great that Graves was overruled, but it’s indefensible that he continues to act based on his religious beliefs. Graves needs to put down his Bible for a moment and spend some time reading the Constitution he is supposed to uphold.