Clearly distraught from the moment he entered the courtroom Friday, Erick Muñoz bent over weeping when a state district judge ordered that his pregnant wife could be taken off life support.

In a case that had generated international headlines and inspired widespread moral and ethical debate, Judge R.H. Wallace Jr. issued his ruling after an hour of wrenching argument from attorneys.

“This is a tragic and very difficult case,” Wallace told a packed courtroom in Fort Worth. “I’m as prepared to make a ruling as I will ever be.”

The judge sided with lawyers for the family, who had argued that a 1999 Texas law requiring pregnant women to be kept on life support did not apply to Marlise Muñoz because she was dead. Attorneys for the family and the hospital had agreed this week that the 33-year-old Haltom City woman was deceased.

She had been hospitalized since Nov. 26, when her husband found her on the kitchen floor of their home, stricken by a fatal embolism. At the time she was 14 weeks pregnant with what would have been the couple’s second child. Citing the law, the hospital had refused to grant the wishes of her husband and family to have her taken off life support.

The law mandates that the pregnant mother be supported until a fetus is viable, typically between 24 and 26 weeks of gestation.

That prompted the legal action and Friday’s hearing.

Wallace ordered the county-owned hospital to discontinue life-sustaining measures to Muñoz by Monday afternoon at 5 p.m. to allow JPS time to decide on whether to appeal.

In a statement, the JPS Health Network said it “appreciates the potential impact of the consequences of the order” and would consult with the Tarrant County district’s attorney’s office.

Erick Muñoz and other family members did not comment after the ruling.

“There is no happiness in this result, only a sigh of relief that this family can now move on to the task of burying Marlise Muñoz,” said attorney Heather King, who represented the family. “We appreciate the courtesy of the attorneys and the judiciary and we feel that today justice was done.”

If the hospital chooses not to appeal, life support could be withdrawn at any time between Friday and Monday, lawyers for the Muñoz family said.

“We would give Erick some time,” King said. “He would need some time to make arrangements.”

‘A science experiment’

The scene in and around the courtroom on Friday befitted a case talked about around the world. Dozens of camera crews jostled in the courthouse corridor and the courtroom itself was packed. Erick Muñoz sat just behind his lawyers, and beside his wife’s parents, Ernest and Lynne Machado.

Erick Muñoz’s family was also in the courtroom. After the decision, he wept into the shoulder of his father, Cayetano Muñoz.

No witnesses were called on Friday, but the arguments of the attorneys were emotional and often graphic.

Lawyer Jessica Janicek, who also represented the family, said the hospital was using “her body as a science experiment,” and that the hospital was using the law to avoid legal liability.

Janicek said while being under life support, Marlise Muñoz had suffered from a variety of infections, and that the fetus, now in its 22nd week, was not progressing normally.

“That’s not surprising because all of this is occurring in a dead body,” Janicek said. “Marlise Muñoz is dead. She has been dead for two months, and for the first time in two months, we ask that she be treated as a dead person.”

King said that despite the life support, Marlise Muñoz’s condition was similar to that of a corpse in rigor mortis.

When Erick Muñoz, a paramedic like his wife, “bends over to kiss her forehead he smells death, and he knows what death smells like,” King said.

“No one in this room would want to put their child in an incubator that didn’t work very well,” King said, adding that the hospital was using “a dead person as a dysfunctional incubator.”

‘A sad truth’

Assistant District Attorney Larry Thompson represented the hospital.

“JPS is not conducting a science experiment and it is not hiding behind a law,” Thompson said. “There is a life involved and it is the life of an unborn child.”

Thompson acknowledged the tragic nature of the case, saying the law “balanced the right of the unborn child against the right of Mr. Muñoz to bury his wife as soon as possible.

”I don’t want to minimize that, [Erick Muñoz’s pain] but what he has to do now is wait,” Thompson said.

This week, attorneys for the Muñoz family released a statement saying that medical records indicate that the fetus is “distinctly abnormal,” with lower extremities deformed, and suffers from a number of other serious health conditions including water on the brain and heart problems.

“Since my wife’s death on Nov. 26, 2013, I have had to endure the pain of watching my wife’s dead body be treated as if she were alive,” Erick Muñoz said in an affidavit filed with the court on Thursday. “As her husband, I wish every day she was alive, but I am positive that my wife has passed away for many reasons.”

Texas lawmakers have demonstrated a commitment to protect unborn children by including in the Texas Penal Code a definition that says a human being is alive at every stage of gestation from fertilization to birth. This means someone may commit murder if during the criminal offense an unborn child is killed, the document states.

The Legislature also passed the Woman's Right to Know Act which states that substantial medical evidence shows that an unborn child is capable of feeling pain by not later than 20 weeks after fertilization.

What happened to the Muñoz family attracted the attention of political leaders.

Gov. Rick Perry’s office called the case “tragic” and said his prayers are with the family. “This was a matter for the court,” his spokeswoman Lucy Nashed said.

Attorney General Greg Abbott issued a statement saying: “This is a heartbreaking tragedy for the entire Muñoz family and our thoughts and prayers will remain with them during this difficult time. Texas strives to protect both families and human life, and we will continue to work toward that end.”

The attorney general’s office was notified of the case, since questions were raised about the constitutionality of a state law. So far, the office has not submitted anything to Wallace’s court.

The Muñoz case also had predictably become a touchstone in the debate over abortion. One leading right to life organization, Texas Alliance for Life in Austin, issued a statement saying it was saddened by the judge’s order.

“The decision fails to recognize the interests of the unborn child, who is a separate patient,” the statement said. “We believe the intent of the legislature, as expressed numerous places in Texas law, is to protect the lives of unborn children to the greatest extent possible.”

But attorneys for the family said the case was not about a broader debate, but one family’s tragedy.

It was a sad truth, King said, that “pregnant women die every day.”

“They die in car accidents. They die of heart attacks. They die from head injuries,” she said. “And when they die the fetus dies with them. That is the way it has always been and that way it should be.”