Continuing mRNA transcription by polymerase II (Pol II) requires prompt correction of DNA lesions by nucleotide excision repair (NER). Here, the authors find that the multiprotein Mediator complex, known to regulate Pol II-mediated transcription, is also linked to the NER machinery through interaction with the 3′ endonuclease Rad2 (also known as XPG in humans). They show that the Med17 subunit of Mediator binds to Rad2 and that Rad2 associates with Pol II-transcribed genes throughout the genome by chromatin immunoprecipitation (ChIP), in a manner that depends on transcription. ChIP–sequencing analysis showed a strong correlation between the presence of Rad2 and Mediator subunits at the promoters of Pol II-transcribed genes. Although Rad2 did not seem to affect transcription, mutants in Med17 showed increased ultraviolet light sensitivity, which increased further on Rad2 loss. This correlated with disrupted Rad2 recruitment and reduced interaction between the two proteins, suggesting that Med17 promotes NER by recruiting Rad2.