Parasitoids are insect parasites whose larvae develop in the bodies of other insects. The main immune defense against parasitoids is encapsulation of the foreign body by blood cells, which subsequently often melanize. The capsule sequesters and kills the parasite. The molecular processes involved are still poorly understood, especially compared with insect humoral immunity.We explored the transcriptional response to parasitoid attack in Drosophila larvae at nine time points following parasitism, hybridizing five biologic replicates per time point to whole-genome microarrays for both parasitized and control larvae. We found significantly different expression profiles for 159 probe sets (representing genes), and we classified them into 16 clusters based on patterns of co-expression. A series of functional annotations were nonrandomly associated with different clusters, including several involving immunity and related functions. We also identified nonrandom associations of transcription factor binding sites for three main regulators of innate immune responses (GATA/srp-like, NF-kappaB/Rel-like and Stat), as well as a novel putative binding site for an unknown transcription factor. The appearance or absence of candidate genes previously associated with insect immunity in our differentially expressed gene set was surveyed.Most genes that exhibited altered expression following parasitoid attack differed from those induced during antimicrobial immune responses, and had not previously been associated with defense. Applying bioinformatic techniques contributed toward a description of the encapsulation response as an integrated system, identifying putative regulators of co-expressed and functionally related genes. Genome-wide studies such as ours are a powerful first approach to investigating novel genes involved in invertebrate immunity.