UK cancer doctors have drawn up guidance for gay men on how long they should abstain from sex before and after prostate cancer treatment.
It warns of potential risks to sexual partners from exposure to radiation after some treatments.
Most cancer doctors don't ask patients about their sexual practices, which means they may not get any advice.
Prostate Cancer UK said the specific timeframes addressed an important issue for gay and bisexual men.
The guidance is based on the opinions of 15 clinical oncologists and 11 urological surgeons from the UK and is being presented at the UK Imaging and Oncology congress in Liverpool.
Sean Ralph, a therapeutic radiographer from Clatterbridge Cancer Centre, who researched the new guidance, said: "Men are normally advised to resume sexual activity soon after prostate cancer treatments in order to help preserve their erectile function."
However, he said the conversation was often "glossed over" and many men did "not feel comfortable to ask".
As a result, some groups of patients, such as gay and bisexual men, had different risks and were not getting appropriate advice and support.
Dr John Burton, from Edinburgh Cancer Centre, and vice-president of oncology, said: "This guidance will be invaluable to clinicians and people receiving treatment for prostate cancer.
"It is long overdue, and addresses an inequality in the level of information available to patients."
He said it could also have an impact around the world for cancer patients.
How long should men abstain from receiving anal sex?
- Before a PSA blood test - one week - may lead to an inaccurate result
- Following a transrectal biopsy (TRUS) - two weeks - may cause bleeding, pain or increase the risk of infection
- Following a transperineal biopsy - one week - to allow bruising to settle, and reduce painful intercourse
- Following a radical prostatectomy - six weeks - may cause bleeding, pain, and increase the risk of urinary incontinence
- After external beam radiotherapy - two months - could make acute side effects worse, be painful, or result in long-term complications such as rectal bleeding
- After permanent seed brachytherapy, where radioactive seeds are inserted into the prostate to kill cancer - six months - to minimise radiation exposure to sexual partner
Catherine Winsor, from Prostate Cancer UK, said specialist nurses were often asked about the issue by patients and doctors.
"This important and much-needed research has addressed an important gap in our ability to support gay and bisexual men," she said.
"We've used this to update our written patient information for this group to include these more specific timeframes on when they should abstain.
"We hope that health professionals will use these findings to provide more consistent, evidence-based guidance."