People unwittingly tend to choose a partner who is likely to have a similar life expectancy, according to new research.
A genetic study found humans also unconsciously select mates who share similar risks of illnesses such as high blood pressure or heart disease.
Experts say the findings help explain why long-term couples often suffer from the same ailments in later years and can have similar life expectancies.
Researchers at the University of Edinburgh examined data from the UK Biobank - a major study of genes and lifestyle factors linked to health that involves more than half a million people.
The team looked at information from the parents of couples and found that even in-laws shared genetic risk factors for diseases and had a similar longevity.
The similarities are greater than would be expected by chance, experts said, suggesting people inadvertently choose a mate who shares the same disease risks as themselves.
Given that many ailments are not visible when people choose their partners, experts say the surprising finding is most likely a result of choosing a mate with shared lifestyle factors that are genetically linked to disease.
Joint risk behaviours such as smoking, or healthy behaviours like maintaining a healthy weight, are most likely to lead to shared diseases in later life and, ultimately, a similar life expectancy, experts believe.
Professor Albert Tenesa, of the university's MRC Human Genetics Unit, said: "Our study suggests that humans tend to select partners for behavioural or physical traits that are genetically related to disease and longevity.
"Understanding what traits these are will require new and long-term studies that follow hundreds of thousands of couples from the moment they meet until later in life when they develop disease."
The study has been published in the journal Heredity.