A two-year-old girl from Glasgow has become the world's youngest patient to undergo deep brain stimulation surgery.
Viktoria Kaftanikaite has had electrodes placed deep inside her brain to treat severe, uncontrolled and painful muscle movements.
The youngster suffers from a rare genetic condition called dystonia which left her screaming in pain, unable to eat and causing breathing difficulties.
It is hoped the operation will vastly improve her quality of life.
It may also have implications on the use of this type of surgery in other young people.
Dystonia can be caused by inherited genetic problems, cerebral palsy or other brain injuries.
The condition has seen Viktoria spend five months in the paediatric intensive care unit at the Royal Hospital for Children in Glasgow.
There she was diagnosed with a rare mutation in the GNAO1 gene and was referred to neurologists at Evelina Hospital in London who recommended deep brain stimulation (DBS).
The operation was a terrifying prospect for her mother Patrycja Majewska.
She told the BBC Scotland news website: "We were worried what would happen. You hear the words brain operation and worry. We were scared she would not wake up."
But, said Patrycja, the choice was clear.
She said: "Life was difficult. She was two-and-a-half. She was exhausted and had no life. She was basically screaming for two-an-a-half-years. She would cry in pain for up to five hours at a time and sleep maybe one in 24 hours.
"There was no decision really. If we didn't try this, she would die anyway."
Viktoria's operation took place in May. The four-hour procedure involved drilling two holes, about the size of a 5p coin, into the top of her skull, and then implanting two electrodes into the area deep inside the brain which controls movement.
This area is described by doctors as containing the "off switch".
The electrodes connect to a pacemaker-like device under the skin of the abdomen. They send fast electrical impulses down the line - about 130 per second - which, over time, will start to normalise the patient's movements.
The surgery used state-of-the-art robotic and intra-operative imaging equipment.
Top neurologist Dr Jean Pierre Lin coordinated Viktoria's treatment.
He said: "Viktoria's uncontrolled and violent movement meant she was in real pain which is extremely upsetting for her parents.
"Deep brain stimulation has been proven in adults and older children to change the course of these conditions, often very dramatically. But the challenge was to deliver this in much younger children.
"With this procedure, we've created real momentum to begin to explore how children respond to this surgical process. This opens the possibility that by identifying the condition faster and operating earlier, we could reduce the impact of dystonia and improve development."
Viktoria's parents realised something was wrong when their baby did not hit the usual development milestones.
They noticed she had difficulties holding things like toys in her hands and had problems holding her head up.
Once the DBS stimulation is balanced with medication, it is hoped she may be able to learn these skills.
After the operation, Patrycja was relieved when her daughter woke up.
She said: "I am so happy for my daughter and I hope the stimulation works. Our lives have been so hard with her in so much pain, especially for her, so this is a chance that she can live a good and happy life."
Viktoria is recovering in hospital in Glasgow. She has fought infection off and on since the surgery.
However her father Martinas initially noticed a difference. He said she was more settled and calmer for longer periods and had more eye contact.
He said: "For two years it was heartbreaking. She was suffering all the time and not developing normally as a baby, crying a lot.
"We will see how she will cope with the stimulator and how it affects her movements."
Doctors who treated Viktoria hope the fact that someone so young has been able to cope with deep brain stimulation will lead to it becoming a procedure to help reduce severe muscle spasms in children who have cerebral palsy, have been born prematurely or have suffered an injury at birth.