Diversifying selection in the PB2 and M1 genes Using the Random Effects Likelihood (REL) method [26] we found sites under positive selection in the PB2 gene (codons 76, 534, 627, 677 and 740) and the PA gene (codon 409) of the reassortant viruses. The Fixed Effects Likelihood (FEL) method [26] was more conservative and only identified PB2 codon 534 as being positively selected. For the group 2 viruses, HA codon 129 (starting from HA1) and M1 gene codon 205 were the only selected sites identified by the FEL and REL methods, respectively. Using a lineage-specific selection model (see Methods), we identified elevated rates of diversifying selection, measured by the ratio of non-synonymous to synonymous substitutions (dN/dS), on the M1 gene in the lineage leading to the MRCA of the group 3 viruses and preceding the emergence of the reassortant viruses (highlighted in Figure 1B ). The dN/dS values for the M1 gene in this lineage (which we call the preemergence lineage) was estimated to be 1.514 (95% CI: 0.447-3.814; see Table S5 ), significantly higher (LRT p,0.002) than the mean estimates for other lineages (dN/dS = 0.077) in the Indonesian clade and for lineages in other H5N1 HPAI clades (e.g., Fujian, Qinghai, Thailand and Vietnam clades which have dN/dS ranging from 0.05 to 0.09). This lineage-specific elevation of dN/dS was not significant (LRT p.0.1) for other genes (i.e. HA, NA, M2, PB1; see Table S5 ). Four amino acid changes in M1 occurred along the pre-emergence lineage, including threonine to alanine at reside 37, arginine to lysine at reside 95, threonine to alanine at reside 137, glutamine to histidine at reside 249. Three (residue 37, 95, and 137) of them are located close to the electrostatic positive surface of the N-terminal domain of the M1 protein molecule ( Figure S7 ), and one (residue 249) is located in the remaining C-terminal fragment.