A 9-year-old girl in Texas will be kept on life support for at least the next two weeks after her mother won a temporary restraining order against the hospital where she has been declared brain dead.

Payton Summons arrived at Cook Children’s Medical Center last Tuesday in cardiac arrest, Fox 4 News reported. She underwent CPR efforts for an hour at home and in the ambulance ride to the hospital, but doctors were unable to revive her.

According to the hospital’s attorney, a cancerous tumor near her heart cut off circulation and is “crushing her heart and lungs.”

Later scans reportedly found no brain activity and she was declared brain dead.

BOY, 7, SUFFERS SEVERE BURNS FROM PICKING LIMES

“Our physicians and nurses were able to revive her heartbeat, but they were unsuccessful in resuscitating her breathing,” the hospital said in a statement, according to the news outlet. “She suffered a devastating injury to her brain due to being without oxygen for over an hour.”

But according to the family’s attorney, Justin Moore, Payton’s parents believe she can recover and want to move her to another hospital.

“As their right under the Texas Advance Directive Act, they should be provided the time and opportunity to find another facility that will allow for continued care of Payton while she slowly recovers,” Moore said in a statement, according to the Star-Telegram. “They simply want to give their child a fighting chance. Far too often, we have seen medical facilities choose profits over care for patients.”

Cook Children’s, which was set to take Payton off life support on Monday before the court’s decision, reportedly sought to arrange for a transfer with two other facilities but it didn’t work out, according to Fox 4 News.

MOM SAYS IT'S A MIRACLE TEEN SON SURVIVED SHARK ATTACK

“There is no facility, there is no phone call that could be made, there is no place that will take her,” Laura Copeland, the hospital’s attorney, said, according to the Star-Telegram. “She is dead. It is very traumatic for the staff to have to do things for a patient they know is dead.”

The hospital expressed sympathy for the family and said it will comply with the court’s decision.

“We respect the effort of Payton’s family to do what they believe is best for their child,” the hospital said in a statement, according to the news outlet. “We experience this kind of parental passion every day and always work alongside the parents.”

State District Judge Melody Wilkinson, who is presiding over the case, has scheduled a second hearing for Friday to revisit the decision.