A federal judge ordered the state of Indiana Thursday to immediately recognize the marriage of a lesbian couple because one of the women was diagnosed with a terminal illness.

Amy Sandler and Niki Quasney of Munster, Ind., sued the state seeking immediate relief from Indiana's ban on legal marriage for same-sex couples. Quasney is battling stage four ovarian cancer, according to Lambda Legal, which brought the suit to court. The couple, who raise two children, married in Massachusetts last year and have been together for 13 years.

United States District Court Judge Richard Young issued an emergency temporary restraining order declaring the state must recognize their marriage. The order is valid for 28 days, after which the court will hold a preliminary injection hearing, according to the Indy Star.

"We are so relieved," Quasney said in a statement. "We are so thankful that we can move forward and concentrate on being with each other. Our time together and with our daughters is the most important thing in the world to me. I look forward to the day when all couples in Indiana have the freedom to marry."

Lawyers argued the couple wants to be recognized as married and receive the protections of marriage in their home state while Quasney is still alive.

"The State of Indiana has no justification for denying them dignity, legitimacy, and respect as a family during this inexpressibly difficult time," said Paul Castillo, staff attorney for Lambda Legal, in a statement. "They're married, they love each other and they are doing their best to protect their family."

The couple worried that without marriage protections, Sandler would be unable to be at Quasney's side at the hospital and would not be protected by surviving spousal benefits under the state's law, according to Castillo.

Sandler and Quasney are plaintiffs in a March 10, lawsuit, Baskin v. Bogan, which includes four other couples suing for the ability to marry.

Indiana state law restricts legal marriages to one man and one woman. Earlier this year, GOP lawmakers attempted to put a proposal to amend the state's constitution to include that definition before voters this November, but that effort failed.