We used the amplified fragment length polymorphism (AFLP) method to obtain genetic markers distinguishing two subspecies of willow warblers Phylloscopus trochilus that have different migratory behaviours but are not differentiated in mitochondrial DNA or at several microsatellite loci. With the inverse-polymerase chain reaction (PCR) approach we converted a dominant AFLP-marker to a codominant single nucleotide polymorphism (SNP). Across Scandinavia we typed 621 birds at the SNP locus AFLP-WW1 and we found a sigmoid change in allele frequencies centred around 62 degrees latitude. North of the latitudinal cline was a west-east cline. Both clines are narrower than one would expect from dispersal distances in willow warblers, which suggests that these are maintained by selection. The latitudinal cline at the locus AFLP-WW1 is paralleled by changes in several other traits, all of which might be maintained by a single selective force. The most plausible selection factor that we have identified is selection against hybrids because of inferior migratory behaviour. The selective force maintaining the east-west cline is less obvious. We discuss alternatives to the selection scenario, involving colonization history and asymmetric gene flow.