Avian influenza A viruses of the H5 and H7 subtypes periodically cause severe outbreaks of disease in poultry. The question we wished to address in this study is whether these highly pathogenic strains constitute unique lineages or whether they and related nonpathogenic viruses are derived from common ancestors in the wild bird reservoir. We therefore compared the nucleotide and amino acid sequences of the hemagglutinin (HA) genes of 15 H5 and 26 H7 influenza A viruses isolated over 91 years from a variety of host species in Eurasia, Africa, Australia, and North America. Phylogenetic analysis indicated that the HA genes of H5 and H7 viruses that cause severe disease in domestic birds do not form unique lineages but share common ancestors with nonpathogenic H5 and H7 viruses. These findings predict that highly pathogenic avian H5 and H7 influenza A viruses will continue to emerge from wild bird reservoirs. Another important question is whether H7 influenza viruses found in mammalian species are derived from avian strains. We included eight equine influenza viruses and one seal isolate in the phylogenetic analysis of H7 HA genes. We could show that the HA genes of both, the equine and the seal viruses, shared ancestors with avian H7 HA genes. This indicates that currently circulating H7 viruses with an avian HA gene may have the potential to adapt to mammalian species and to cause an influenza outbreak in the new host.