Histone deacetylases (HDACs) modify core histones and participate in large regulatory complexes that both suppress and enhance transcription. Recent studies indicate that some HDACs can act on non-histone proteins as well. Interest in these enzymes is growing because HDAC inhibitors appear to be promising therapeutic agents against cancer and a variety of other diseases. Thus far, 11 members of the HDAC family have been identified in humans, but few have been characterized in detail. To better define the biological function of these proteins, make maximal use of studies performed in other systems, and assist in drug development efforts, we have performed a phylogenetic analysis of all HDAC-related proteins in all fully sequenced free-living organisms. Previous analyses have divided non-sirtuin HDACs into two groups, classes 1 and 2. We find that HDACs can be divided into three equally distinct groups: class 1, class 2, and a third class consisting of proteins related to the recently identified human HDAC11 gene. We term this novel group "class 4" to distinguish it from the unrelated "class 3" sirtuin deacetylases. Analysis of gene duplication events indicates that the common ancestor of metazoan organisms contained two class 1, two class 2, and a single class 4 HDAC. Examination of HDAC characteristics in light of these evolutionary relationships leads to functional predictions, among them that self-association is common among HDAC proteins. All three HDAC classes (including class 4) exist in eubacteria. Phylogenetic analysis of bacterial HDAC relatives suggests that all three HDAC classes precede the evolution of histone proteins and raises the possibility that the primary activity of some "histone deacetylase" enzymes is directed against non-histone substrates.