The radically distinct morphologies of arthropod and tetrapod legs argue that these appendages do not share a common evolutionary origin. Yet, despite dramatic differences in morphology, it has been known for some time that transcription factors encoded by the Distalless (Dll)/Dlx gene family play a critical role in the development of both structures. Here we show that a second transcription factor family encoded by the Sp8 gene family, previously implicated in vertebrate limb development, also plays an early and fundamental role in arthropod leg development. By simultaneously removing the function of two Sp8 orthologs, buttonhead (btd) and Sp1, during Drosophila embryogenesis, we find that adult leg development is completely abolished. Remarkably, in the absence of these factors, transformations from ventral to dorsal appendage identities are observed, suggesting that adult dorsal fates become derepressed when ventral fates are eliminated. Further, we show that Sp1 plays a much more important role in ventral appendage specification than btd and that Sp1 lies genetically upstream of Dll. In addition to these selector-like gene functions, Sp1 and btd are also required during larval stages for the growth of the leg. Vertebrate Sp8 can rescue many of the functions of the Drosophila genes, arguing that these activities have been conserved, despite more than 500 million years of independent evolution. These observations suggest that an ancient Sp8/Dlx gene cassette was used in an early metazoan for primitive limb-like outgrowths and that this cassette was co-opted multiple times for appendage formation in multiple animal phyla.