The citizens of nations which rate themselves happiest are more likely to have a specific allele in their DNA, which is involved in sensory pleasure and pain reduction, researchers found.
They used data from the nationally representative World Values Survey (2000-2014), calculating the average national percentages of respondents who unambiguously reported being 'very happy'.
The researchers, including those from Varna University of Management in Bulgaria, found a strong correlation between a nation's happiness and the presence of the A allele in the fatty acid amide hydrolase (FAAH) gene variant rs324420 in its citizens' genetic make-up.
Nations with the highest prevalence of the A allele are quite clearly also those who perceive themselves happiest.
More From This Section
These include Ghana and Nigeria in West Africa, and northern Latin American nations, such as Mexico and Colombia, whose citizens are of Amerindian or mixed Euro-American descent.
The Arab nations of Iraq and Jordan, and the East Asian nations of Hong Kong, China, Thailand and Taiwan, which had the lowest prevalence of this allele, were found to be the least likely to rate themselves as 'very happy'.
Northern Europeans such as Swedes were found to have a much higher prevalence of the A allele - and more often rate themselves as being very happy - than their cousins from Central or Southern Europe.
Economic wealth, the type of law governing a nation or disease patterns did not significantly influence national differences in happiness.
However, politics and economics did cause fluctuations in happiness levels in certain countries during the time this study was conducted, researchers said.
Climatic differences were also found to be significantly associated with national differences in happiness.
"We have not shown that a nation's genetic and climatic heritage doom a particular country to a specific happiness score, but that it can still rise and fall because of situational factors," said Michael Bond from the Hong Kong Polytechnic University.
The findings were published in the journal of Happiness Studies.