Highly pathogenic avian influenza (HPAI) H5N1 (clade 2.2) was introduced into Egypt in early 2006. Despite the control measures taken, including mass vaccination of poultry, the virus rapidly spread among commercial and backyard flocks. Since the initial outbreaks, the virus in Egypt has evolved into a third order clade (clade 2.2.1) and diverged into antigenically and genetically distinct subclades. To better understand the dynamics of HPAI H5N1 evolution in countries that differ in vaccination policy, we undertook an in-depth analysis of those virus strains circulating in Egypt between 2006 and 2010, and compared countries where vaccination was adopted (Egypt and Indonesia) to those where it was not (Nigeria, Turkey and Thailand). This study incorporated 751 sequences (Egypt n=309, Indonesia n=149, Nigeria n=106, Turkey n=87, Thailand n=100) of the complete haemagglutinin (HA) open reading frame, the major antigenic determinant of influenza A virus. Our analysis revealed that two main Egyptian subclades (termed A and B) have co-circulated in domestic poultry since late 2007 and exhibit different profiles of positively selected codons and rates of nucleotide substitution. The mean evolutionary rate of subclade A H5N1 viruses was 4.07×10(-3) nucleotide substitutions per site, per year (HPD 95%, 3.23-4.91), whereas subclade B possessed a markedly higher substitution rate (8.87×10(-3); 95% HPD 7.0-10.72×10(-3)) and a stronger signature of positive selection. Although the direct association between H5N1 vaccination and virus evolution is difficult to establish, we found evidence for a difference in the evolutionary dynamics of H5N1 viruses among countries where vaccination was or was not adopted. In particular, both evolutionary rates and the number of positively selected sites were higher in virus populations circulating in countries applying avian influenza vaccination for H5N1, compared to viruses circulating in countries which had never used vaccination. We therefore urge a greater consideration of the potential consequences of inadequate vaccination on viral evolution.