Sonic hedgehog (Shh) directs the development of ventral cell fates, including floor plate and V3 interneurons, in the mouse neural tube. Here, we show that the transcription factors Gli2 and Gli3, mediators of Shh signaling, are required for the development of the ventral cell fates but make distinct contributions to controlling cell fates at different locations along the rostral-caudal axis. Mutants lacking Patched1 (Ptc1), the putative receptor of Shh, were used to analyze Gli functions. Ptc1(-/-) mutants develop floor plate, motor neuron, and V3 interneuron progenitors in lateral and dorsal regions, suggesting that the normal role of Ptc1 is to suppress ventral cell development in dorsal neural tube. The Ptc1(-/-) phenotype is rescued, with restoration of dorsal cell types, by the lack of Gli2, but only in the caudal neural tube. In triple mutants of Gli2, Gli3, and Ptc1, dorsal and lateral cell fates are restored in the entire neural tube. These observations suggest that Gli2 is essential for ventral specification in the caudal neural tube, and that in more rostral regions, only Gli3 can promote development of ventral cells if Gli2 is absent. Thus, Shh signaling is mediated by overlapping but distinct functions of Gli2 and Gli3, and their relative contributions vary along the rostral-caudal axis.