A Texas court has granted a family’s wish for a temporary restraining order that will prevent the hospital where their 9-month-old baby is being cared for from taking her off life support.

The family of Tinslee Lewis, who was born with congenital heart issues and has been at Cook Children’s for the entirety of her young life, said the court order will buy them more time to find a hospital willing to keep her on the life-saving machines.

Tinslee was born with Ebstein Anomaly, which, according to Cincinnati Children’s Hospital, is an abnormality in the tricuspid valve, which separates the right atrium from the right ventricle, and affects normal blood flow. In some cases, the disorder can cause the right atrium to swell, or even cause congestive heart failure.

Tinslee has already undergone several surgeries for the disorder and also suffers from chronic lung disease and severe chronic pulmonary hypertension. For the past several months, she has been on a ventilator, according to Fox 7 Austin.

Doctors at the hospital said Tinslee’s health will not improve and that she is “suffering,” but her family believes she needs more time to recover. Under the Texas Advance Directives Act, the hospital is allowed to withdraw life-sustaining treatment 10 days after determining a patient is in an “irreversible condition,” according to Fox 7 Austin. On Oct. 31, the hospital informed Tinslee’s family of their decision, springing them into action.

2 IN 5 AMERICANS HAVE MISDIAGNOSED THEMSELVES AFTER SEARCHING SYMPTOMS ONLINE, SURVEY FINDS

"We are a family who believes where there's just a little air, there's hope," Beverly Winston, the infant's relative, told CBS DFW. "Regardless of your reason, what the law is -- she deserves the chance to fight for her life, and she has a troop who will help her 100 percent and above."

Ahead of the court's decision, the hospital had issued a statement explaining the doctors' conclusions, and their effort to find a hospital willing to take Tinslee on as a patient.

“Tinslee Lewis is a beautiful baby who has captured the hearts of many at Cook Children’s since her premature birth nine months ago,” a statement from the Cook Children’s hospital said, according to CBS DFW.

“In the last several months, it’s become apparent her health will never improve,” the statement continued. “Despite our best efforts, her condition is irreversible, meaning it will never be cured or eliminated. Without life-sustaining treatment, her condition is fatal. But more importantly, her physicians believe she is suffering.”

BABY BORN WITH RARE SKIN DISORDER ALLEGEDLY ABANDONED AT HOSPITAL IN ITALY

“To maintain the delicate balance necessary to sustain Tinslee’s life, and to prevent her from pulling out the lines that are connected to the ventilator, doctors have had to keep her constantly paralyzed and sedated,” the statement said. “While Tinslee may sometimes appear alert and moving, her movements are the result of being weaned off of the paralyzing drugs. We believe Tinslee is reacting in pain when she’s not sedated and paralyzed.”

The hospital said they have reached out to nearly 20 hospitals in hopes of arranging for a transfer, but Children’s Hospital of Philadelphia, Johns Hopkins, University Hospital San Antonio, Texas Children’s, Dallas Children’s Boston Children’s and Children’s Hospital of Los Angeles are among those who have all declined to accept Tinslee as a patient.

On Sunday, the day the infant’s life support was due to be turned off, a judge sided with Tinslee’s family preventing the hospital from doing so until Nov. 22, when another hearing is scheduled.

CLICK HERE TO GET THE FOX NEWS APP

“I thought that they were going to pull the plug on my baby,” Trinity Lewis, the baby’s mother, told Fox 7 Austin. “I didn’t think she was going to still be here today, and that’s what I’m grateful for.”