A federal judge on Thursday ordered Indiana to recognize the out-of-state marriage of a lesbian woman suffering from ovarian cancer.

U.S. District Judge Richard L. Young handed down his ruling after holding a hearing in his Evansville chambers.

Niki Quasney and Amy Sandler, who married last year in Massachusetts, the first state to legalize such unions nearly a decade ago, recently joined one of five lawsuits challenging the constitutionality of Indiana's restrictive marriage law. They asked Young to order the state to recognize their marriage so that Quasney, who has stage 4 ovarian cancer, can be listed as married on her anticipated death certificate and Sandler listed as her surviving spouse. Young issued a 28-day temporary restraining order.

“This is, indeed, a case where a woman is dying and needs immediate relief for her family,” Paul Castillo, a Lambda Legal attorney who is representing the plaintiffs, told The Indianapolis Star. “We are here today so that a woman can die in dignity.”

The state argued that current law does not allow for hardship exceptions.

The women have been together 13 years and are raising two daughters, ages 1 and 2.

The ruling comes a day after the ACLU filed a similar case involving three plaintiff couples in North Carolina.

(Related: Utah defends its gay marriage ban in case with far-reaching implications.)