Mạc dynasty
From the 16th century onward, civil strife and frequent political infighting engulfed much of Vietnam. First, the Chinese-supported Mạc dynasty challenged the Lê dynasty's power. After the Mạc dynasty was defeated, the Lê dynasty was nominally reinstalled. Actual power, however, was divided between the northern Trịnh lords and the southern Nguyễn lords, who engaged in a civil war for more than four decades before a truce was called in the 1670s. During this period, the Nguyễn expanded southern Vietnam into the Mekong Delta, annexing the Central Highlands and the Khmer lands in the Mekong Delta. The division of the country ended a century later when the Tây Sơn brothers established a new dynasty. However, their rule did not last long, and they were defeated by the remnants of the Nguyễn lords, led by Nguyễn Ánh, aided by the French. Nguyễn Ánh unified Vietnam, and established the Nguyễn dynasty, ruling under the name Gia Long.