Octopamine is likely to be an important neuroactive molecule in invertebrates. Here we report the molecular cloning of the Drosophila melanogaster gene, which encodes tyramine beta-hydroxylase (TBH), the enzyme that catalyzes the last step in octopamine biosynthesis. The deduced amino acid sequence of the encoded protein exhibits 39% identity to the evolutionarily related mammalian dopamine beta-hydroxylase enzyme. We generated a polyclonal antibody against the protein product of T beta h gene, and we demonstrate that the TBH expression pattern is remarkably similar to the previously described octopamine immunoreactivity in Drosophila. We further report the creation of null mutations at the T beta h locus, which result in complete absence of TBH protein and blockage of the octopamine biosynthesis. T beta h-null flies are octopamine-less but survive to adulthood. They are normal in external morphology, but the females are sterile, because although they mate, they retain fully developed eggs. Finally, we demonstrate that this defect in egg laying is associated with the octopamine deficit, because females that have retained eggs initiate egg laying when transferred onto octopamine-supplemented food.