However, after building Shokoku-ji Temple as his family temple, Yoshimitsu reformed the gozan system drastically on July 10 (in the old calendar) 1386 taking into account the opinions of Shushin GIDO, Chushin ZEKKAI and others in the following way: "A status above gozan" should be given to Nanzen-ji Temple, placing the temple at the highest rank of all Zen temples, and in its place Sokoku-ji Temple should be included among the gozan temples, while furthermore, the gozan status was divided into Kyoto gozan and Kamakura gozan.
ところが、義満が足利将軍家の菩提寺として相国寺を建立すると、至徳(日本)3年7月10日_(旧暦)（1386年）に義堂周信・絶海中津らの意見を容れて五山制度の大改革を断行、南禅寺を「五山の上」として全ての禅林の最高位とする代わりに相国寺を「五山」に入れ、更に五山を京都五山と鎌倉五山に分割した。