Image copyright Children's Hospital Oakland Image caption Brian Madeux and his fiancé Marcie Humphrey

Gene-editing has been attempted on cells inside a patient, in a world first by doctors in California.

Brian Madeux, 44 from Arizona, was given the experimental treatment to try to correct a defect in his DNA that causes Hunter's syndrome.

Mr Madeux says he was prepared to take part in the trial as he is "in pain every second of the day".

It is too soon to know whether or not the gene-editing has worked in Mr Madeux's case.

Hunter's syndrome is rare. Patients are born without the genetic instructions for an enzyme that breaks down long sugary molecules called mucopolysaccharides.

Instead, they build up in the body and damage the brain and other organs. Severe cases are often fatal.

"I actually thought I wouldn't live past my early 20s," said Mr Madeux.

Patients need regular enzyme replacement therapy to break down the mucopolysaccharides.

Image copyright Children's Hospital Oakland

But Mr Madeux has been given an experimental treatment to rewrite his DNA to give him the instructions for making the enzyme.

The therapy was infused into his bloodstream on Monday at Oakland's UCSF Benioff Children's Hospital.

The therapy contains two molecular scissors - called zinc finger nucleases - that cut the DNA at a precise spot.

This creates an opening for a new piece of DNA, containing the desired instructions, to be inserted into the patient's genetic code.

The genetic therapy has been designed so it becomes active only once it gets inside Mr Madeux's liver cells.

Dr Chester Whitley, one of the doctors working on the trial, told the BBC: "If works as well as it does in mice, this has huge ramifications.

"I'm very optimistic we have a both safe and efficacious way of providing gene therapy."

His long-term hope is to perform gene-editing shortly after birth, because an "untreated baby loses 20 IQ points per year".

Image copyright Children's Hospital Oakland

Gene editing has been tried in people before, but cells have been taken out of the body, edited, checked for errors and then placed back in.

That works for tissues that can be temporally removed and returned at a later date like a sample of bone marrow.

However, such an approach is impossible for organs like the liver, heart or brain. It is why doctors have attempted the gene editing inside the patient's body.

The trial is testing only the safety of performing the gene editing and it will require more research to know if it could be a valid therapy.

So far there have been no side effects in Mr Madeux and if everything continues to go well, then up to nine patients will receive the experimental procedure as part of the study.

'New frontier'

Dr Sandy Macrae, from Sangamo Therapeutics, which designed the therapy, said: "For the first time, a patient has received a therapy intended to precisely edit the DNA of cells directly inside the body.

"We are at the start of a new frontier of genomic medicine."

Further safety trials using the same technology to treat haemophilia B and Hurler syndrome are also planned.

Mr Madeux says he is prepared to have his DNA altered "if it will prolong my life and help scientists find cures for humankind".

Follow James on Twitter.