Branches are coloured according to the 4 discrete traits (host order, host species, flyway and location) on internal nodes. Mexican outbreak strains are highlighted with pink. A: Host order. Five host orders are labelled on HA tree: wild birds of the order Anseriformes (ans-wild); wild birds of the order Charadriiformes (cha-wild); wild birds of the order Passeriformes (pas-wild); domestic birds of the order Galliformes and Mexico H7N3 outbreak in the order Galliformes (gal-domestic-Mexico). B: Host species. Wild Anseriformes are classified into the five main species and a group comprising the other rarer species of Anseriformes in this study: mallard (Anas platyrhynchos), northern pintail (Anasacuta), northern shoveller, blue-winged teal, green-winged teal and other Anseriformes (other ans); The order Galliformes are shown as “outbreak” (the H7N3 Mexico outbreak) and “other_gal”; The other orders are shown as: Charadriiformes (cha) and Galliformes (gal), Gruiformes (gru) and Passeriformes (pas). C: Flyway. Four specific North American flyways are labelled on the HA tree: the Atlantic, Mississippi, Central, and Pacific. D: State. 22 states and provinces of the viral sample locations are labelled on the HA tree. The original MCC tree files with all taxa names are deposited in Dryad (doi:10.5061/dryad.j5bf8), and trees for the other 7 segments without taxa names can be found in Figure S2, S3, S4, S5, S6, S7, S8.