Revolt of the Three Feudatories
After the fall of the Southern Ming, the Qing dynasty became the mediator in the Lê-Mạc conflict while receiving tribute from both sides. The Kangxi Emperor attempted to negotiate peace between the two states. After the Lê attacked and gained control of Cao Bằng Province without permission from the Qing, the Kangxi Emperor demanded in 1667 that Lê Chiêu Thống return Cao Bằng Province to the Mạc. In 1673, the Qing had lost interest in mediating the conflict on behalf of the Mạc. In 1677, the Revolt of the Three Feudatories in southern China prompted the Qing to enlist the aid of the Lê, who accused the Mạc of joining the rebels. The Kangxi Emperor and his advisors agreed to arrest Mạc Kính Vũ as he fled into Guangxi, leading to the demise of the Mạc dynasty.