The incidence of cutaneous melanoma is rising rapidly in a number of countries. The key environmental risk factor is exposure to the ultraviolet (UV) component in sunlight. The nucleotide excision repair (NER) pathway deals with the main forms of UV-induced DNA damage. We have investigated the hypothesis that polymorphisms in NER genes constitute genetic susceptibility factors for melanoma. However, not all melanomas arise on sun-exposed sites and so we investigated the hypothesis that genes involved in other pathways for the repair of oxidative DNA damage may also be involved in susceptibility to melanoma. Scotland, with its high incidence of melanoma and stable homogeneous population, was ideal for this case-control study, involving 596 Scottish melanoma patients and 441 population-based controls. Significant associations were found for the NER genes ERCC1 and XPF, with the strongest associations for melanoma cases aged 50 and under [ERCC1 odds ratio (OR) 1.59, P = 0.008; XPF OR 1.69, P = 0.003]. Although an XPD haplotype was associated with melanoma, it did not contain the variant 751 Gln allele, which has been associated with melanoma in some previous studies. No associations were found for the base excision repair and DNA damage response genes investigated. An association was also found for a polymorphism in the promoter of the vitamin D receptor gene, VDR (OR 1.88, P = 0.005). The products of the two NER genes, ERCC1 and XPF, where associations with melanoma were found, act together in a rate-limiting step in the repair pathway.