Wheat blast, a devastating disease having spread recently from South America to Asia and Africa, is caused by Pyricularia oryzae pathotype Triticum which emerged in 1985. Rmg8 and Rmg7, genes for resistance to wheat blast found in common wheat and tetraploid wheat, respectively, recognize the same avirulence gene, AVR-Rmg8. Here, we show an evolutionary process in which resistance gene(s), which had obtained an ability to recognize AVR-Rmg8 before the differentiation of Triticum and Aegilops, has expanded its target pathogens. Molecular cloning revealed that Rmg7 was one of alleles of Pm4 (Pm4a), a gene for resistance to wheat powdery mildew on 2AL, whereas Rmg8 was its homoeolog on 2BL ineffective against wheat powdery mildew. Rmg8 variants with the ability to recognize AVR-Rmg8 were distributed not only in Triticum spp. but also in Aegilops speltoides Ae. umbellulata, and Ae. comosa. This result suggests that the origin of resistance gene(s) recognizing AVR-Rmg8 dates back to the time before differentiation of A, B, S, U, and M genomes, that is, ~5 million years before the emergence of its current target, the wheat blast fungus. Phylogenetic analyses suggested that, in the evolutionary process thereafter, some of their variants gained the ability to recognize the wheat powdery mildew fungus and evolved into genes for resistance to wheat powdery mildew.