The somda (sine oculis-medusa) mutant is the result of a P element insertion at position 43C on the second chromosome. somda causes aberrant development of the larval photoreceptor (Bolwig's) organ and the optic lobe primordium in the embryo. Later in development, adult photoreceptors fail to project axons into the optic ganglion. Consequently optic lobe development is aborted and photoreceptor cells show age-dependent retinal degeneration. The so gene was isolated and characterized. The gene encodes a homeodomain protein expressed in the optic lobe primordium and Bolwig's organ of embryos, in the developing adult visual system of larvae, and in photoreceptor cells and optic lobes of adults. In addition, the SO product is found at invagination sites during embryonic development: at the stomadeal invagination, the cephalic furrow, and at segmental boundaries. The mutant somda allele causes severe reduction of SO embryonic expression but maintains adult visual system expression. Ubiquitous expression of the SO gene product in 4-8-hr embryos rescues all somda mutant abnormalities, including the adult phenotypes. Thus, all deficits in adult visual system development and function results from failure to properly express the so gene during embryonic development. This analysis shows that the homeodomain containing SO gene product is involved in the specification of the larval and adult visual system development during embryogenesis.