The initial stages of pancreatic development occur early during mammalian embryogenesis, but the genes governing this process remain largely unknown. The homeodomain protein Pdx1 is expressed in the developing pancreatic anlagen from the approximately 10-somite stage, and mutations in the gene Pdx1 prevent the development of the pancreas. The initial stages of pancreatic development, however, still occur in Pdx1-deficient mice. Hlxb9 (encoding Hb9; ref. 6) is a homeobox gene that in humans has been linked to dominant inherited sacral agenesis and we show here that Hb9 is expressed at early stages of mouse pancreatic development and later in differentiated beta-cells. Hlxb9 has an essential function in the initial stages of pancreatic development. In absence of Hlxb9 expression, the dorsal region of the gut epithelium fails to initiate a pancreatic differentiation program. In contrast, the ventral pancreatic endoderm develops but exhibits a later and more subtle perturbation in beta-cell differentiation and in islet cell organization. Thus, dorsally Hlxb9 is required for specifying the gut epithelium to a pancreatic fate and ventrally for ensuring proper endocrine cell differentiation.