The ruling is the first one to challenge Ohio's ban on gay marriage.
James Obergefell and John Arthur have been living together for the past 20 years. The two flew to Maryland on July 11, got married at the airport terminal and then flew back to Ohio.
The wedding was supposed to facilitate for Obergefell to be listed as Arthur's surviving spouse on his death certificate, thus allowing them to request to be buried next to each other after they died. Arthur has amyotrophic lateral sclerosis, often called Lou Gehrig's disease, and has been given weeks or days to live.
But the state of Ohio and a cemetery refused to acknowledge their marriage.
The two 47-year-olds filed a suit last week seeking to to allow Obergefell to be listed on the death certificate as a surviving spouse.
On Monday, a federal court judge ruled in their favor declaring that the death certificate could be filed as the couple wanted.
The judge found that the Ohio constitution "violates rights secured by the ... United States Constitution in that same-sex couples married in jurisdictions where same-sex marriages are valid, who seek to have their out-of-state marriage accepted as legal in Ohio, are treated differently than opposite-sex couples who have been married in states where their circumstances allow marriage in that state but not in Ohio."
The couple's attorney, Al Gerhardstein, argued in court that the state of Ohio should treat out-of-state same -ex marriages the same way it treats traditional out-of-state marriages.
"I think this is going to open the door to create a large number of same-sex couples married in other states" to try to change the law, he said.
"We've been beside each other for 20 years. We deserve to be beside each other in perpetuity," Obergefell testified Monday.
The ruling, which according to Obergefell, "validates [the couple's] marriage," is being perceived by many gay-rights supporters as a step forward to reversing Ohio's ban on same-sex-marriage.
Man spent 15 hours in jail for plugging electric car into an outlet at a school
Florida bear attack: Black bear mauls woman's face