Pain sensitivity is controlled by a genetic "dimmer switch", which can be re-set, UK scientists have discovered.
Twins sharing 100% of genes have different pain thresholds, which can potentially be altered by lifestyle or medication, say researchers at King's College, London.
The study could lead to new painkillers or lifestyle interventions, they report in Nature Communications.
One in five of the population suffers from acute or chronic pain.
Lead researcher Dr Jordana Bell said the potential to regulate genes involved in pain sensitivity "is very exciting and could lead to a more effective pain relief treatment for patients suffering with chronic pain".
Sensitivity to pain is complex, with wide individual variation. Previous studies have suggested about half of the influence is explained by genes.
To identify levels of sensitivity to pain, scientists tested 25 pairs of identical twins using a heat probe placed on the arm.
Identical twins share 100% of their genes; therefore any difference between identical twins must be due to their environment or changes affecting the function of their genes.
Study participants were asked to press a button when the heat became painful for them, which allowed the researchers to determine their pain thresholds.
Using DNA sequencing, the researchers examined the whole genetic codes (genomes) of the twins and compared them with 50 unrelated individuals.
The research team found chemical changes within nine genes involved in pain sensitivity that were different in one twin but not in her identical sister.
These were most significant within a known pain sensitivity gene, which is already a target for the development of new painkillers.
Research into the switching on and off of genes, a process known as epigenetic regulation, is a big growth area for the development of new medicines.
Tim Spector, professor of genetic epidemiology at King's College London, said epigenetic switching is "like a dimmer switch for gene expression".
"This landmark study shows how identical twins, when combined with the latest technology to look at millions of epigenetic signals, can be used to find the small chemical switches in our genes that make us all unique - and in this case respond to pain differently."
The chemical changes act like a "thermostat" or "dimmer switch" to set an individual's pain sensitivity, Prof Spector added.
"Using drugs or changes in lifestyle, we might be able to reset that thermostat, allowing that person in the future to feel less pain," he told BBC News.
"The epigenetic changes are potentially reversible."