The civil war involving the Lê-Trịnh and Mạc dynasties resulted in 1592, when the military of Trịnh Tùng conquered Hanoi and executed king Mạc Mậu Hợp. Survivors from the Mạc royal loved ones fled to your northern mountains in the province of Cao Bằng and ongoing to rule there right up until 1677 when Trịnh Tạc conquered this