We have cloned and sequenced a large portion of the hunchback (hb) locus from Drosophila virilis. Comparison with the Drosophila melanogaster hb sequence shows multiple strong homologies in the upstream and downstream regions of the gene, including most of the known functional parts. The coding sequence is highly conserved within the presumptive DNA-binding finger regions, but more diverged outside of them. The regions of high divergence are correlated with regions which are rich in short direct repeats (regions of high 'cryptic simplicity'), suggesting a significant influence of slippage-like mechanisms in the evolutionary divergence of the two genes. Staining of early D.virilis embryos with an hb antibody reveals conserved and divergent features of the spatial expression pattern at blastoderm stage. It appears that the basic expression pattern, which serves as the gap gene function of hb, is conserved, while certain secondary expression patterns, which have separate functions for the segmentation process, are partly diverged. Thus, both slippage driven mutations in the coding region, which are likely to occur at higher rates than point mutations and the evolutionary divergence of secondary expression patterns may contribute to the evolution of regulatory genes.