A quantitative algorithm was developed and applied to predict target genes of microRNAs encoded by herpesviruses. Although there is almost no conservation among microRNAs of different herpesvirus subfamilies, a common pattern of regulation emerged. The algorithm predicts that herpes simplex virus 1, human cytomegalovirus, Epstein–Barr virus, and Kaposi's sarcoma-associated herpesvirus all employ microRNAs to suppress expression of their own genes, including their immediate-early genes. In the case of human cytomegalovirus, a virus-coded microRNA, miR-112-1, was predicted to target the viral immediate-early protein 1 mRNA. To test this prediction, mutant viruses were generated that were unable to express the microRNA, or encoded an immediate-early 1 mRNA lacking its target site. Analysis of RNA and protein within infected cells demonstrated that miR-UL112-1 inhibits expression of the major immediate-early protein. We propose that herpesviruses use microRNA-mediated suppression of immediate-early genes as part of their strategy to enter and maintain latency.