show Abstracthide AbstractCynipid gallwasps are a fascinating group of gall inducers of a wide diversity of plant families. They are characterised by strong host conservation punctuated by host shifts to phylogenetically distant hosts, and the most morphologically complex arthropod galls. In this study we determined the potential origin of the gallwasps and basal relationships among major groups of gall-inducers and inquilines that inhabit already induced galls. Gallwasp genomes encode plant cell wall degrading enzyme of prokaryotic origin that are involved in gall induction. We test if these genes define gallwasps versus their entomophagous sister taxon. A targeted sampling and phylogenomic approach resulted in better-resolved phylogenies than previously possible. A group of figitid species associated with galls are proposed ancestors of the gallwasps. The gallwasps and these gall-associated figitids potentially together form a monophyletic group. This explains the presence of plant cell wall degrading enzymes in the gall-associated figitid species included. One species of cynipid does not encode plant cell wall degrading enzymes in its genome; it is both basal in the cynipid phylogeny and is probably a parasitoid. Inquilinism evolved multiple times in one monophyletic grouping of cynipids and at least one inquiline genus has shifted host gall inducer species