Men could reduce their risk of developing prostate cancer through regular masturbation, researchers suggest.
Researchers were assessing prostate cancer risk
They say cancer-causing chemicals could build up in the prostate if men do not ejaculate regularly.
And they say sexual intercourse may not have the same protective effect because of the possibility of contracting a sexually transmitted infection, which could increase men's cancer risk.
Australian researchers questioned over 1,000 men who had developed prostate cancer and 1,250 who had not about their sexual habits.
They found those who had ejaculated the most between the ages of 20 and 50 were the least likely to develop the cancer.
The protective effect was greatest while the men were in their 20s.
Men who ejaculated more than five times a week were a third less likely to develop prostate cancer later in life.
Previous research has suggested that a high number of sexual partners or a high level of sexual activity increased a man's risk of developing prostate cancer by up to 40%.
But the Australian researchers who carried out this study suggest the early work missed the protective effect of ejaculation because it focussed on sexual intercourse, with its associated risk of STIs.
Graham Giles, of the Cancer Council Victoria in Melbourne, who led the research team, told New Scientist: "Had we been able to remove ejaculations associated with sexual intercourse, there should have been an even stronger protective effect of ejaculations."
The researchers suggest that ejaculating may prevent carcinogens accumulating in the prostate gland.
The prostate provides a fluid into semen during ejaculation that activates sperm and prevents them sticking together.
The fluid has high concentrations of substances including potassium, zinc, fructose and citric acid, which are drawn from the bloodstream.
But animal studies have shown carcinogens such as 3-methylchloranthrene, found in cigarette smoke, are also concentrated in the prostate.
Dr Giles said fewer ejaculations may mean the carcinogens build up.
"It's a prostatic stagnation hypothesis. The more you flush the ducts out, the less there is to hang around and damage the cells that line them."
A similar connection has been found between breast cancer and breastfeeding, where lactating appeared to "flush out" carcinogens, reduce a woman's risk of the disease, New Scientist reports.
Another theory put forward by the researchers is that ejaculation may induce prostate glands to mature fully, making them less susceptible to carcinogens.
Dr Chris Hiley, head of policy and research at the UK's Prostate Cancer Charity, told BBC News Online: "This is a plausible theory."
She added: "In the same way the human papillomavirus has been linked to cervical cancer, there is a suggestion that bits of prostate cancer may be related to a sexually transmitted infection earlier in life."
Anthony Smith, deputy director of the Australian Research Centre in Sex,
Health and Society at La Trobe University in Melbourne, said the research could affect the kind of lifestyle advice doctors give to patients.
"Masturbation is part of people's sexual repertoire.
"If these findings hold up, then it's
perfectly reasonable that men should be encouraged to masturbate," he said.