The Lê dynasty, also known in historiography as the Later Lê dynasty (Vietnamese: "Nhà Hậu Lê" or "Triều Hậu Lê", chữ Hán: 朝後黎, chữ Nôm: 茹後黎), officially Đại Việt (Chữ Hán: 大越), was the longest-ruling Vietnamese dynasty, having ruled from 1428 to 1789, with an interregnum between 1527 and 1533. The Lê dynasty is divided into two historical periods: the Initial Lê dynasty (Vietnamese: triều Lê sơ, chữ Hán: 朝黎初, or Vietnamese: nhà Lê sơ, chữ Nôm: 茹黎初; 1428–1527) before the usurpation by the Mạc dynasty, in which emperors ruled in their own right, and the Revival Lê dynasty (Vietnamese: triều Lê Trung hưng, chữ Hán: 朝黎中興, or Vietnamese: nhà Lê trung hưng, chữ Nôm: 茹黎中興; 1533–1789), in which the emperors were figures who reigned under the auspices of the powerful Trịnh family. The Revival Lê dynasty was marked by two lengthy civil wars: the Lê–Mạc War (1533–1592) in which two dynasties battled for legitimacy in northern Vietnam and the Trịnh–Nguyễn Wars (1627–1672, 1774–1777) between the Trịnh lords in North and the Nguyễn lords of the South.
The dynasty officially began in 1428 with the enthronement of Lê Lợi after he drove the Ming Chinese army from Vietnam. The dynasty reached its peak during the reign of Lê Thánh Tông and declined after his death in 1497. In 1527, the Mạc dynasty usurped the throne; when the Lê dynasty was restored in 1533, the Mạc fled to the far north and continued to claim the throne during the period known as Southern and Northern Dynasties. The restored Lê emperors held no real power, and by the time the Mạc dynasty was finally eradicated in 1677, actual power lay in the hands of the Trịnh lords in the North and Nguyễn lords in the South, both ruling in the name of the Lê emperor while fighting each other. The Lê dynasty officially ended in 1789, when the peasant uprising of the Tây Sơn brothers defeated both the Trịnh and the Nguyễn, ironically in order to restore power to the Lê dynasty.