Runs of identical amino acids encoded by triplet repeats (homopolymers) are components of numerous proteins, yet their role is poorly understood. Large numbers of homopolymers are present in the Drosophila melanogaster mastermind (mam) protein surrounding several unique charged amino acid clusters. Comparison of mam sequences from D. virilis and D. melanogaster reveals a high level of amino acid conservation in the charged clusters. In contrast, significant divergence is found in repetitive regions resulting from numerous amino acid replacements and large insertions and deletions. It appears that repetitive regions are under less selective pressure than unique regions, consistent with the idea that homopolymers act as flexible spacers separating functional domains in proteins. Notwithstanding extensive length variation in intervening homopolymers, there is extreme conservation of the amino acid spacing of specific charge clusters. The results support a model where homopolymer length variability is constrained by natural selection.