During organogenesis, the foregut endoderm gives rise to the many different cell types that comprise the hepatopancreatic system, including hepatic, pancreatic and gallbladder cells, as well as the epithelial cells of the hepatopancreatic ductal system that connects these organs together and with the intestine. However, the mechanisms responsible for demarcating ducts versus organs are poorly understood. Here, we show that Fgf10 signaling from the adjacent mesenchyme is responsible for refining the boundaries between the hepatopancreatic duct and organs. In zebrafish fgf10 mutants, the hepatopancreatic ductal epithelium is severely dysmorphic, and cells of the hepatopancreatic ductal system and adjacent intestine misdifferentiate toward hepatic and pancreatic fates. Furthermore, Fgf10 also functions to prevent the differentiation of the proximal pancreas and liver into hepatic and pancreatic cells, respectively. These data shed light onto how the multipotent cells of the foregut endoderm, and subsequently those of the hepatopancreatic duct, are directed toward different organ fates.