A federal judge in Oklahoma ruled Tuesday that the state’s constitutional amendment barring same-sex marriage violated the federal Constitution, the latest in a string of legal victories for gay rights and one that occurred in the heart of the Bible Belt.

The state’s ban on marriage by gay and lesbian couples is “an arbitrary, irrational exclusion of just one class of Oklahoma citizens from a governmental benefit,” wrote Judge Terence C. Kern of United States District Court for the Northern District of Oklahoma, in Tulsa, deciding a case that had languished for nine years. The amendment, he said, is based on “moral disapproval” and does not advance the state’s asserted interests in promoting heterosexual marriage or the welfare of children.

“We’re jubilant, we’re over the moon,” said one of the plaintiffs, Sharon Baldwin, 45, who has lived with her partner and co-plaintiff, Mary Bishop, 52, for 17 years.

The two both work as editors at The Tulsa World newspaper and had just arrived at work on Tuesday afternoon when the city editor told them of the decision.

“We’re taking the day off,” Ms. Baldwin said.