Amid such circumstance, in 1392 (Genchu 9/Meitoku 3), through Shogun Yoshimitsu's mediation, under the conditions that the alternate succession between the Kameyama (Daitokuji) and Jimyoin lineages be restored, and the Kameyama (Daitokuji) lineage be officially made owner of all the Kokuga (public) territory in the entire country (although in actuality, there was very little such territory due to the proliferation of shoen), Emperor Gokameyama of the Southern Court handed over the Imperial Regalia to Emperor Gokomatsu of the Northern Court, and the Northern and Southern Courts were unified (in what was called the Peace Treaty of Meitoku).
このような情勢の中で1392年（元中9年/明徳3年）、足利義満の斡旋で、大覚寺統と持明院統の両統迭立と、全国の国衙領を大覚寺統の所有とすること（実際には国衙領はわずかしかなかった）を条件に、南朝の後亀山天皇が北朝の後小松天皇に三種の神器を渡し、南北朝が合体した（明徳の和約）。