In 1448 during the disorder of the "Maha Devi", Muang Phuan and some areas along the Black River were annexed by the kingdom of Đại Việt and several skirmishes took place against Lanna along the Nan River. In 1471 Emperor Lê Thánh Tông of Đại Việt invaded and destroyed the kingdom of Champa. Also in 1471, Muang Phuan revolted and several Vietnamese were killed. By 1478 preparations were being made for a full-scale invasion of Lan Xang in retribution for the rebellion in Muang Phuan and, more importantly, for supporting the Ming Empire in 1421.