Previous studies have described the morphology, innervation and O(2)-chemoreceptive properties of neuroepithelial cells (NECs) of the zebrafish gill filaments. The present work describes the ontogenesis of these cells, and the formation of functional O(2)-sensing pathways in developing zebrafish. Confocal immunofluorescence was performed on whole-mount gill preparations using antibodies against serotonin (5-HT) and a zebrafish-derived neuronal marker (zn-12) to identify the appearance and innervation of gill NECs during larval stages. NECs were first expressed in gill filament primordia of larvae at 5 days postfertilization (d.p.f.) and were fully innervated by 7 d.p.f. In vivo ventilation frequency analysis revealed that a behavioural response to hypoxia (11.2+/-2.8 min(-1)) developed in embryos as early as 2 d.p.f., and a significant increase (P<0.05) in the ventilatory response to hypoxia (200.8+/-23.0 min(-1)) coincided with innervation of NECs of the filaments. In addition, exogenous application of quinidine, a blocker of O(2)-sensitive background K(+) channels in NECs, induced hyperventilation in adults in a dose-dependent manner and revealed the development of a quinidine-sensitive ventilatory response in 7 d.p.f. larvae. This study shows that NEC innervation in the gill filaments may account for the development of a functional O(2)-sensing pathway and the hyperventilatory response to hypoxia in zebrafish larvae. At earlier stages, however, O(2)-sensing must occur through another pathway. The possibility that a new type of 5-HT-positive NEC of the gill arches may account for this earlier hypoxic response is discussed.