HOUSTON, Texas (KTRK) -- A baby who was at the center of a life support battle at Texas Children's Hospital died shortly after he was officially released on Tuesday, according to a family doctor.
Nick Torres was released Tuesday afternoon to the custody of his family. Dr. Joseph Varon said the baby had been home for two hours when his heart stopped beating.
"The family surrounded the baby. They were praying," he said. "Everyone was very respectful and praying. Eventually, when I said he had flat-lined, I disconnected him from the respirator. They were very emotional. The last thing you want to see is your children go through this."
WATCH: Family doctor on Baby Nick's death: 'Final moments were emotional
The 10-month-old had been at the center of legal fight for weeks.
On Sept. 24, he was found unresponsive after being left unattended in a bathtub. On Sept. 30, doctors at Texas Children's Hospital declared him brain dead and wanted to remove him from life support. His parents argued he should be kept alive because his heart was still beating.
After several appeals, judges ruled in the hospital's favor.
Over the weekend, the hospital agreed to release Nick to go home, according to the attorney's office representing the family, if the Harris County Medical Examiner approved, as required by law.
Tuesday afternoon, Texas Children's confirmed the baby was released "with the full approval and authorization" of the medical examiner.
"We continue to do everything we reasonably can to support the Torres family in this very tragic and difficult situation," the hospital said in a statement.
Dr. Varon said, because of Nick's condition, the end was inevitable. He was surprised how long he held on.
"As a clinician, I'm going to say it's just basic science," he explained. "This is just a natural evolution that was going to happen. Now, the timing is what calls my attention, to be honest with you. It would appear the baby waited until he got home to move on."
According to a family spokesperson, the family and their attorney signed a confidentiality agreement saying they would not discuss the case further.