We have identified and cloned a novel type of homeobox gene that is composed of two homeodomains and is expressed in the Drosophila endoderm. Mutant analysis reveals that its activity is required at the foregut/midgut boundary for the development of the proventriculus. This organ regulates food passage from the foregut into the midgut and forms by the infolding of ectoderm and endoderm-derived tissues. The endodermal outer wall structure of the proventriculus is collapsed in the mutants leading to a failure of the ectodermal part to invaginate and build a functional multilayered organ. Lack-of-function and gain-of-function experiments show that the expression of this homeobox gene in the proventriculus endoderm is induced in response to Wingless activity emanating from the ectoderm/endoderm boundary whereas its expression in the central midgut is controlled by Dpp and Wingless signalling emanating from the overlying visceral mesoderm.