Carterton girl Grace Yeats will undergo brain surgery in a radical attempt to bring her home.
The 10-year-old will have an operation known as "deep brain stimulation" at Auckland's Starship Hospital on Wednesday.
It is her first major surgery since catching a mystery illness exactly six months ago.
Doctors will drill into Grace's skull and insert electrodes in her brain, in what is believed to be a medical first in New Zealand for a child.
The electrodes will then be wired to a pacemaker, which will be implanted in her chest.
The device will be calibrated to stimulate and counter the section of her brain that causes the intense and painful spasms that affect Grace's body.
Jonathan Tanner, spokesman for the Grace Yeats Trust, said the operation carried obvious risks, which were higher for Grace due to her age.
"It's exciting but scary.
"It is a positive that they are willing to do this . . . because we're running out of options."
While the operation was not a cure, it was hoped it would reduce the powerful spasms - or dystonia - which are seen as the biggest obstacle to bringing Grace home.
"The spasms are the thing that cause the most damage and distress, for everyone really."
The operation is also used to treat parkinson's disease.
Grace, a St Mary's School pupil, has been unable to move since May when she was struck down with a mystery illness just hours after complaining of a sore throat.
- © Fairfax NZ News
Is John Banks' upcoming trial the end for the ACT party?Related story: Banks takes only viable option