Targeting of a gene to the nuclear pore complexes (NPCs), known as gene gating, can affect its transcriptional state. However, the mechanism underlying gene gating is poorly understood. Here, we have identified SAGA-associated Sgf73 (ref. 10), the yeast orthologue of human Ataxin-7 (ref. 11), as a regulator of histone H2B ubiquitin levels, a modification linked to both transcription initiation and elongation. Sgf73 is a key component of a minimal histone-deubiquitinating complex. Activation of the H2B deubiquitinating protease, Ubp8, is cooperative and requires complex formation with the amino-terminal zinc-finger-containing domain of Sgf73 and Sgf11-Sus1. Through a separate domain, Sgf73 mediates recruitment of the TREX-2 mRNA export factors Sac3 and Thp1 to SAGA and their stable interaction with Sus1-Cdc31. This latter step is crucial to target TREX-2 to the NPC. Loss of Sgf73 from SAGA abrogates gene gating of GAL1 and causes a GAL1 mRNA export defect. Thus, Sgf73 provides a molecular scaffold to integrate the regulation of H2B ubiquitin levels, tethering of a gene to the NPC and export of mRNA.