Nguyễn Kim
In 1529, unable to resist the forces of the Lê, the Mạc dynasty retreated to the north and established a new capital at Cao Bằng Province allying with the Ming dynasty of China as a tributary nation against the Lê dynasty. The Revival Lê dynasty eventually recaptured three-quarters of their former kingdom. Inasmuch as the Mac dynasty ruled the northern portion of Đại Việt while the Lê dynasty ruled the remainder of the country, this time became known as the period of Northern and Southern dynasties. After capturing the capital Đông Kinh, Nguyễn Kim made the son of the former emperor Lê Chiêu Tông, Lê Trang Tông emperor of Đại Việt. The title was given to Lê Trang Tông, however, only as a figurehead. Nguyễn Kim retained the real power for himself and ruled the kingdom. In 1545, Nguyễn Kim was poisoned by Dương Chấp Nhất), a surrendered general of the Mạc dynasty. The power of royal court was then passed to Nguyễn Kim's son-in-law Trịnh Kiểm who became the founder of the Trịnh lords. Later, the first son of Nguyễn Kim, Nguyễn Uông was assassinated by Trịnh Kiểm. Nguyễn Kim's second son, the Marquis of Hạ khê (Hạ khê hầu) Nguyễn Hoàng relocated to the south, became the Viceroy of Thuận Hoá province, founded the Nguyễn lords, and started a revolt against the reign of the Trịnh lords. As such, Đại Việt was divided for 232 years as the two lords fought each other in what is now known as the Trịnh–Nguyễn Civil War. This conflict only ended then the Tây Sơn brothers led the peasants in the Tây Sơn rebellion eventually conquering the entire kingdom in 1789. The last emperor of Lê dynasty Lê Chiêu Thống fled to exile in China and the dynasty collapsed.