Transcriptional repression mediated through histone deacetylation is a critical component of eukaryotic gene regulation. Here we demonstrate that the class II histone deacetylase HDAC4 is covalently modified by the ubiquitin-related SUMO-1 modifier. A sumoylation-deficient point mutant (HDAC4-K559R) shows a slightly impaired ability to repress transcription as well as reduced histone deacetylase activity. The ability of HDAC4 to self-aggregate is a prerequisite for proper sumoylation in vivo. Calcium/calmodulin-dependent protein kinase (CaMK) signalling, which induces nuclear export, abrogates SUMO-1 modification of HDAC4. Moreover, the modification depends on the presence of an intact nuclear localization signal and is catalysed by the nuclear pore complex (NPC) RanBP2 protein, a factor newly identified as a SUMO E3 ligase. These findings suggest that sumoylation of HDAC4 takes place at the NPC and is coupled to its nuclear import. Finally, modification experiments indicate that the MEF2-interacting transcription repressor (MITR) as well as HDAC1 and -6 are similarly SUMO modified, indicating that sumoylation may be an important regulatory mechanism for the control of transcriptional repression mediated by both class I and II HDACs.