CINCINNATI — 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, both 47, 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.

Obergefell said Tuesday that he and Arthur's fight was about more than just a piece of paper.

"To have a federal judge say, 'You know what, John and Jim, your relationship exists and it's just as valid as any other married couple,'" Obergefell said. "It's an incredible feeling — that we do matter."

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 Arthur and Obergefell were courageous to take on the legal fight, given Arthur's declining health.

"They're in the middle of every couple's worst nightmare," Gerhardstein said. "This is a very difficult time for them and to share this time with the world as they try to solve these problems — it's been a huge sacrifice for them and I admire them."

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."