Despite the lack of adaptive immunity based on gene rearrangement such as that in higher vertebrates, flies are able to defend themselves from a wide array of pathogens using multiple innate immune responses whose molecular mechanisms are strikingly similar to those of the innate immune responses of other multicellular organisms, including humans. Invading pathogens passing through the epithelial barriers, the first line of self-defense, are detected by pattern recognition receptors that identify pathogen-associated molecular patterns in the hemolymph or on the immune cell surface and are eliminated by humoral and cellular responses. Some pathogens escape recognition and elimination in the hemolymph by invading the host cell cytoplasm. Some of these intracellular pathogens, however, such as Listeria monocytogenes, are identified by pattern recognition receptors in the cytoplasm and are eliminated by intracellular responses, including autophagy, an intracellular degradation system. Although some of these pattern recognition receptors are encoded in the germ-line as protein families, another type of receptor in the immunoglobulin-superfamily is extensively diversified by alternative splicing in somatic immune cells in Drosophila.