Phosphodiesterase 5A inhibitors (PDEIs), a common treatment for erectile dysfunction, were recently linked to an increased risk of melanoma. We conducted two parallel case-control studies, using the Danish Nationwide Health Registries (DNHR) and the Kaiser Permanente Northern California (KPNC) electronic health records. Identifying men with histologically verified melanoma (cases) matched on birth year to 10 cancer-free controls, we estimated odds ratios (OR) for melanoma associated with high use of PDEIs (?100 tablets filled), adjusting for available confounders. We identified 7045 DNHR and 2972 KPNC cases with invasive melanoma. The adjusted OR for invasive melanoma associated with high PDEI use was 1.22 (95% confidence interval (CI), 0.99-1.49) in DNHR and 0.95 (95% CI, 0.78-1.14) in KPNC. Odds ratios were highest for localised invasive melanoma in DNHR (OR, 1.21) and melanoma in situ in KPNC (OR, 1.15), and lowest for non-localised disease in both populations (ORs 0.75 and 0.61, respectively). The increased ORs were slightly attenuated upon adjustment for markers of health-care utilisation. We found little evidence for a causal association between PDEI use and risk of melanoma. The marginally increased risk of early stage disease likely resulted from more frequent health-care contacts among PDEI users.