The genotoxic effects of ultraviolet (UV) radiation are well-known causes of skin cancers; however, UV radiation also suppresses the immune system, decreasing the body's surveillance for tumor cells. In experimental systems, UV radiation immunosuppression is at least partially mediated through urocanic acid (UCA), an UV radiation-absorbing molecule in the stratum corneum. We tested the hypothesis that genetic variation in the histidase gene (HAL), which catalyzes the formation of UCA in the skin, modifies risk of basal cell carcinoma (BCC) and squamous cell carcinoma (SCC) in a population-based study (914 BCC, 702 SCC and 848 controls). We observed no evidence of a main gene effect for the HAL I439V polymorphism (rs7297245) and BCC or SCC. However, we found a HAL genotype-sunburn interaction in association with BCC (P for interaction = 0.040) and SCC (P for interaction = 0.018). A HAL genotype-SCC association was observed primarily among women (odds ratio = 1.5, 95% confidence interval 1.1-2.2), and among women, we found an interaction between HAL genotype and oral contraceptive use on SCC risk (P = 0.040). The variant HAL allele likewise appeared to modify the SCC risk associated with glucocorticoid steroid usage (P for interaction = 0.0004). In conclusion, our findings are a first step in determining the genetic underpinnings of UV immune suppression and have identified important new genetic interactions contributing to the etiology of skin cancer.