Archamoebae is an understudied group of anaerobic free-living or endobiotic protists that constitutes the major anaerobic lineage of the supergroup Amoebozoa. Hitherto, the phylogeny of Archamoebae was based solely on SSU rRNA and actin genes, which did not resolve relationships among the main lineages of the group. Because of this uncertainty, several different scenarios had been proposed for the phylogeny of the Archamoebae. In this study, we present the first multigene phylogenetic analysis that includes members of Pelomyxidae, and Rhizomastixidae. The analysis clearly shows that Mastigamoebidae, Pelomyxidae and Rhizomastixidae form a clade of mostly free-living, amoeboid flagellates, here called Pelobiontida. The predominantly endobiotic and aflagellated Entamoebidae represents a separate, deep-branching lineage, Entamoebida. Therefore, two unique evolutionary events, horizontal transfer of the nitrogen fixation system from bacteria and transfer of the sulfate activation pathway to mitochondrial derivatives, predate the radiation of recent lineages of Archamoebae. The endobiotic lifestyle has arisen at least three times independently during the evolution of the group. We also present new ultrastructural data that clarifies the primary divergence among the family Mastigamoebidae which had previously been inferred from phylogenetic analyses based on SSU rDNA.