The role of histamine as a fast neurotransmitter of imaginal insect photoreceptors is firmly established. In adult Drosophila, histamine is also found in mechanosensory receptors of cuticular hair sensilla and in a small number of nonreceptor neurons in head and body ganglia. Here we investigate the function of histamine by immunohistochemical and behavioral analysis of mutants deficient in the hdc gene that codes for histidine decarboxylase. The allele hdcJK910 appears to be a null mutation, as histamine immunoreactivity is almost entirely eliminated. Homozygous flies are blind in various behavioral paradigms. Mutant larvae, on the other hand, show normal photokinetic responses. Thus, adult Drosophila photoreceptors most likely utilize only a single substance, histamine, as a neurotransmitter, whereas larval photoreceptors apparently employ a different transmitter. With the alleles hdcP211, hdcP217, and hdcP218, variable amounts of histamine are found in photoreceptors and mechanoreceptors, but no histamine could be detected in any of the nonreceptor neurons. These mutants show various degrees of visual and mechanosensory impairment, as determined by quantitative behavioral assays. We conclude that histamine is required for normal function of cuticular hair sensilla and for efficient grooming of the body surface. Thus, in Drosophila, histamine represents a major functional neurotransmitter for mechanosensory receptors.