Pancreatic organogenesis relies on a complex interplay of cell-autonomous and extracellular signals. We demonstrate that the morphogen sonic hedgehog (Shh) is required for pancreatic development in zebrafish. Genetic mutants of Shh and its signaling pathway establish this dependence as specific to endocrine, but not exocrine, pancreas. Using cyclopamine to inhibit hedgehog signaling, we show that transient Shh signaling is necessary during gastrulation for subsequent differentiation of endoderm into islet tissue. A second hedgehog-dependent activity occurring later in development was also identified and may be analogous to the known action of Shh in gut endoderm to direct localization of pancreatic development. The early action of Shh may be part of a more general process allowing neuroendocrine cells to originate in nonneuroectodermally derived tissues.