俺答汗
With the revolt against the Yuan Dynasty in mid-14th century, Hongwu Emperor drove the Mongols north beyond the Great Wall and founded the Ming Dynasty. However, he did not manage to eliminate Mongolian power, which continued to pester the northern frontier for the next two hundred years. When Qi was in Beijing in 1550, Altan Khan, ruler of the Tumed Mongols, broke through the northern defenses and nearly devastated Beijing. In 1571, the Ming Dynasty bestowed the title "Lord Shunyi" () upon Altan Khan and established trade with the Mongols. Altan Khan then forbade his subordinates from raiding Chinese settlements. However, other Mongols led by Jasaghtu Khan continued to test Qi's defenses, though without much success.