A judge has ordered that a pregnant Texas woman be taken off life support after nearly two months in a Texas hospital, reports the Associated Press. The woman was previously forced to stay on life support because of a Texas law that prohibits hospitals from withdrawing life-sustaining treatment from a pregnant patient.

Tarrant County District Judge R.H. Wallace gave John Peter Smith Hospital in Ft. Worth until 6 p.m. EST Monday to disconnect Munoz from her ventilator, reports NBC News. The hospital argued on Thursday that taking Munoz off her life support “would cause the death of the unborn child,” but admitted the fetus “is not viable” in a joint affidavit filed before the hearing on Friday.

Marlise Munoz has brain dead since Nov. 28 after suffering what doctors believe was a pulmonary embolism. She was 14 weeks pregnant at the time of the attack. She was put on life support when she was sent to John Peter Smith Hospital.

Because the Texas law at the center of the debate involves “life-sustaining” treatment, the issue centers on the medical definition of death. Brain death is one of two medical definitions of death. In this case, because Munoz is legally dead, the Texas law may not apply in this case.

Munoz’s husband, Erick Munoz sued the hospital and his lawyer said in a statement that “Our client's position is that the statute prohibiting the withholding of life-sustaining measures from a pregnant patient does not apply to the dead.”

Both Munoz and her husband are paramedics and he contends that she specifically asked to be kept off life support in such a situation. Further complicating the situation were statements by the family’s legal counsel that stated the fetus was severely “deformed” due to the lack of oxygen and conditions of gestation.