CINCINNATI (AP) — Two Ohio men who want their out-of-state marriage recognized as one of them nears death have gotten a ruling in their favor from a federal judge, who wrote that they deserve to be treated with dignity in a case that’s seen as encouraging for same-sex marriage supporters in the state.

Federal Judge Timothy Black ordered Monday that the death certificate of ailing John Arthur show that he was married and that James Obergefell is his surviving spouse. The ruling means the pair can be buried next to each other in Arthur’s family plot, located at a cemetery that only allows descendants and spouses.

Ohio does not recognize same-sex marriage.

Arthur and Obergefell say they’ve been in love for more than 20 years, that Arthur is likely on the verge of dying from Lou Gehrig’s disease, and that “they very much want the world to officially remember and record their union as a married couple,” according to a lawsuit filed by the couple Friday against Ohio Gov. John Kasich, Attorney General Mike DeWine and a Cincinnati official responsible for filing death certificates.

Though Black’s order was specific to the couple’s case, opponents of Ohio’s ban on gay marriage were encouraged by it.

“This is one more step toward marriage equality in the state of Ohio,” said the couple’s attorney, Al Gerhardstein, who said he’s gotten calls from other same-sex couples who married in other states and are exploring their options to have their marriage recognized in Ohio.

He said that when he told Arthur and Obergefell about Monday’s ruling, they were overjoyed.

“This is more than just a legal form,” Gerhardstein said. “It’s the state where these men have built their lives, the city where they built their lives, finally turning to them and saying, ‘Yes, we do recognize that you’re a couple as much as any opposite-sex couple and that your life and now your death will be honored in a way that other married couples would be treated.’”

Obergefell did not immediately return a call for comment Tuesday, while a relative who answered the couple’s phone said that Arthur was too ill to speak. He is in a hospice, court records say.

The couple, determined to marry before Arthur died, flew in a special jet with medical equipment to Maryland, which recognizes gay marriage. They wed July 11 inside the plane on an airport tarmac before returning to Cincinnati the same day, according to court records.

In his ruling, Black said that historically, Ohio law has recognized out-of-state marriages as valid as long as they were legal where they took place, pointing to marriages between cousins and involving minors.

“How then can Ohio, especially given the historical status of Ohio law, single out same-sex marriages as ones it will not recognize?” Black wrote. “The short answer is that Ohio cannot.”

DeWine’s spokesman, Dan Tierney, said in a statement that “this is a temporary ruling at a preliminary stage under sad circumstances.”

He said DeWine’s office will defend the right of Ohioans to define marriage and that the U.S. Supreme Court has recently emphasized that it is a definition that traditionally lies with states.

“Ohio’s voters are entitled to the choice they have made on this fundamental issue,” he said.

Kasich spokesman Robert Nichols said in a statement that the office doesn’t comment on pending litigation, “other than to say that the governor believes that marriage is between a man and a woman.”

Black wrote that the couple would experience irreparable harm without his timely ruling.

“The uncertainty around this issue during Mr. Arthur’s final illness is the cause of extreme emotional hardship to the couple,” Black wrote. “Dying with an incorrect death certificate that prohibits Mr. Arthur from being buried with dignity constitutes irreparable harm.”