(CNN) A Texas judge granted 9-month-old Tinslee Lewis' family a temporary restraining order against a children's hospital who planned to take her off life-support.

Tinslee was born with a rare heart defect called Ebstein's anomaly and suffers from chronic lung disease and severe chronic pulmonary hypertension, Cook Children's Health Care System spokesperson Winifred King said in a statement. All of which has kept her in Cook Children's intensive care unit and on life-sustaining treatment for most of her life, King said.

Her physicians believe she is suffering and her condition is irreversible, King said, so the hospital planned to remove her life-support.

"While we believe every child's life is sacred, we also believe that no child should be sentenced to a life of pain. Removing this beautiful child from mechanical ventilation is a gut-wrenching decision for Cook Children's physicians and staff, however we feel it is in her best interest to free her from artificial, medical intervention and suffering," King said.

But an order signed Sunday and filed the next day stopped the hospital from ending treatment for Tinslee at least until November 23.

Read More