The development of a digestive system is an essential feature of bilaterians. Studies of the molecular control of gut formation in arthropods have been studied in detail in the fruit fly Drosophila melanogaster. However, little is known in other arthropods, especially in noninsect arthropods. To better understand the evolution of arthropod alimentary system, we investigate the molecular control of gut development in the spider Parasteatoda tepidariorum (Pt), the primary chelicerate model species for developmental studies. Orthologs of the ectodermal genes Pt-wingless (Pt-wg) and Pt-hedgehog (Pt-hh), of the endodermal genes, Pt-serpent (Pt-srp) and Pt-hepatocyte-nuclear factor-4 (Pt-hnf4) and of the mesodermal gene Pt-twist (Pt-twi) are expressed in the same germ layers during spider gut development as in D. melanogaster. Thus, our expression data suggest that the downstream molecular components involved in gut development in arthropods are conserved. However, Pt-forkhead (Pt-fkh) expression and function in spiders is considerably different from its D. melanogaster ortholog. Pt-fkh is expressed before gastrulation in a cell population that gives rise to endodermal and mesodermal precursors, suggesting a possible role for this factor in specification of both germ layers. To test this hypothesis, we knocked down Pt-fkh via RNA interference. Pt-fkh RNAi embryos not only fail to develop a proper gut, but also lack the mesodermal Pt-twi expressing cells. Thus, in spiders Pt-fkh specifies endodermal and mesodermal germ layers. We discuss the implications of these findings for the evolution and development of gut formation in Ecdysozoans.