Despite having a rare medical condition that involved arteries and veins getting tangled, which could result in a bleed, Maisha Najeeb was a healthy 10-year-old until she went into hospital in June 2010.
On other occasions, she had successfully received embolisation treatment, which involves injecting glue to block off bleeding blood vessels, and an injection of a harmless dye to check the flow of blood around the brain and head.
But on this occasion, said solicitor Edwina Rawson, of legal firm Field Fisher Waterhouse, there was no system in place for distinguishing between the syringes containing the glue and those containing the dye, and they got mixed up.
This resulted in glue being wrongly injected into the artery to Maisha's brain, causing catastrophic and permanent brain damage.
Today, Judge Birtles at London's High Court approved a settlement against Great Ormond Street Hospital For Children NHS Trust of a £2.8 million lump sum, plus £383,000 a year until Maisha is 19, increasing to £423,000 per year for as long as she lives, which some experts expect to be to the age of 64.
The trust, which admitted liability for Maisha's injuries, repeated its unreserved apologies for the shortcomings in her care, which had such devastating consequences.
It said her family had engaged open-heartedly with the trust, which had allowed staff to really learn from what happened to Maisha so that improvements could be made.
Neil Block QC, said: "We can't wind the clock back. We hope there are now systems and procedures in place to ensure such a tragic mistake cannot be made again.
"While money can't restore what Maisha has lost, we are sure a great burden has been lifted from the family by coming to the settlement we have."
He said one could not help but be inspired by what Maisha's parents, Sadir Hussain and Rukshana, had achieved in terms of their 13-year-old daughter's rehabilitation.
"It is probably the most intensive cognitive rehabilitation we have ever seen by a family and we would wish to acknowledge everything they have done for Maisha and wish them well for the future."
The judge extended his sympathy and admiration to the family and said he hoped the compensation would make the rest of Maisha's life as comfortable as possible.
Outside court, Maisha's father, of Ilford, Essex, said: " We are sad and devastated by what happened to our daughter. Her life is ruined. All her dreams have been broken.
"I hope that by bringing this case, lessons will have been learned to avoid this happening to other families.
"We are grateful that agreement has been reached with Great Ormond Street to ensure that Maisha's care needs are met."
The compensation will be spent on care and accommodation for Maisha, who needs assistance with all daily tasks day and night, is in a wheelchair and has lost the vast majority of her bodily and cognitive abilities.
Ms Rawson said: "What is so heart-breaking about this case is that the injury was so avoidable.
"If the syringes had been marked-up so the hospital could see which contained glue and which contained dye, then Maisha would not have suffered what is an utterly devastating brain injury. Such easily avoidable mistakes should not happen."