In 1381, the Zhu Yuanzhang sent a force against the last remnant of the forces of the Yuan dynasty, led by the Prince of Liang Basalawarmi, who committed suicide. This left Duan Gong, a successor of Duan Xingzhi, as the last representative of the remaining Yuan forces. He refused to surrender and attempted to have the former realm of the Dali Kingdom recognized as a tributary state. When he was defeated in battle, the surviving Duan brothers were taken captive and escorted to the capital. There they were given an insignificant office in the interior. From then on, "permanent chieftains were replaced by transferable officials," formally appointed by the Ming court.