Bagan declined precipitously when the kingdom it was capital of suffered the 13th century invasions by the Mongols. Bagan was no longer a capital after 1297.
The Mongols also conquered the kingdom that Dali in the 13th century, and while the royal family 'ruled' on in the old city, administration shifted to Yunnanfu, now called Kunming. The city of Dali consequently declined.