The life and death of a young street performer from Pakistan who could walk on hot coals and drive knives through his arms without flinching has led scientists to a genetic discovery that could revolutionise the treatment of pain.

Scientists at Cambridge University began studying the child to understand why he was unable to feel pain, but was otherwise completely healthy. He died shortly before his 14th birthday, from injuries sustained after jumping off a roof while playing with friends.

The scientists broadened their investigation to three families related to the child and found that none had experienced pain at any time in their lives. All six family members had bruises and cuts and most had fractured bones. Two were missing the front third of their tongues after biting themselves in childhood. The way in which the young street performer died also highlighted the importance of pain as a built-in defence mechanism to stop people damaging themselves.

Detailed neurological tests on the families, all of whom originated in northern Pakistan, revealed they responded normally to touch, temperature, tickling and pressure and had no signs of nerve disease. An explanation for the rare condition only became apparent when a team of scientists led by Geoff Woods, a medical geneticist at Cambridge, conducted extensive genetic tests which revealed they all carried an extremely unusual mutation in a single gene.

The defect, in a gene called SCN9A, disrupts the flow of sodium ions in specific nerve fibres that sense damage. The results of the research are published today in the journal Nature.

John Wood, a neurobiologist at University College London and co-author of the study, said: "The mutation means that the very first stage of that electrical signal is lost, so the pain signal doesn't reach the brain." Scientists have previously written about people who do not feel pain, but in all other cases they suffered other medical problems because of the damage to their nerves.

Dr Woods, from the University of Cambridge institute for medical research, said: "This paper shows that rare diseases can still be of great importance because of the insights they give into biological and developmental processes."

The researchers included a number of investigators from Pakistan and other UK institutions. The work, which was carried out with the drug company Pfizer, paves the way for a new approach to managing pain, the scientists believe.

They hope drugs that block the same biological pathway affected by the mutation will yield new and potentially safer pain medications.

"This gives us an excellent target to develop painkillers, because we know that if we can block this sodium channel, you will lose the perception of pain, but it will not affect you in any other way," said Dr Wood. "Potentially this is as important as the identification of the morphine receptors. It is fascinating that this same gene, when mutated to encode a hyperactive channel, has also been found to contribute to ongoing pain in some heritable human disorders."