Twenty-seven PCR-derived antigen B (AgB) nucleotide sequences from four Echinococcus species (Echinococcus granulosus, Echinococcus multilocularis, Echinococcus oligarthrus and Echinococcus vogeli) were aligned with 78 already published sequences, to generate a maximum likelihood phylogeny of the AgB multigene family. The phylogenetic analysis confirms that the family is constituted by four groups of genes present in each one of the four species (AgB1, AgB2, AgB3 and AgB4), and suggests that it originated by ancient duplication events preceding speciation within the genus. AgB5 sequences, which had been formerly suggested to correspond to a putatively new AgB subunit, cluster with AgB3. Likelihood tests suggest that AgB gene evolution may have been driven by heterogeneous selection pressures acting on particular AgB1, AgB3 and AgB4 codons. No selection is detected in AgB2. We discuss implications of our findings in terms of AgB biology and its use as a diagnostic tool.