It will be a double-blind, placebo-controlled, randomized trial. Patients scheduled for external-beam radiotherapy for prostate cancer will start using tadalafil 20 mg or placebo the first day of radiation. The blinded medication (active drug or placebo) has to be taken once every two days starting the day of the first radiation up to 12 months (52 weeks) after radiotherapy. The active drug or placebo may be taken at bedtime unrelated to sexual activity. In case of side effects the dose can be reduced to 10 mg. Erectile function will be assessed every 3 months up to 6 weeks (week 58) after discontinuation of drug treatment by using questions 3 and 4 of the International Index of Erectile Function (IIEF). Responders (maintained erectile function) are defined as having a combined score of >=8 for the IIEF questions 3 and 4.