After the expulsion of the Mongols from China, the Jurchen clans remained loyal to Toghan Temür, the last Yuan emperor. In 1375, Naghachu, a Mongol commander of the Mongolia-based Northern Yuan dynasty in Liaoyang province invaded Liaodong with aims of restoring the Mongols to power. Although he continued to hold southern Manchuria, Naghachu finally surrendered to the Ming dynasty in 1387. In order to protect the northern border areas the Ming decided to "pacify" the Jurchens in order to deal with its problems with Yuan remnants along its northern border. The Ming solidified control only under Yongle Emperor (1402–1424).