The Tây Sơn wars or Tây Sơn rebellion, often known as the Vietnamese civil war of 1771–1802, were a series of military conflicts that followed the Vietnamese peasant uprising at Tây Sơn (in Central Vietnam) that were led by three brothers: Nguyễn Nhạc, Nguyễn Huệ, and Nguyễn Lữ. These revolutionary forces grew and later overthrew the ruling Vietnamese elite families and the ruling Lê dynasty. The Tây Sơn leaders installed themselves as rulers of Vietnam that held power until they were overthrown by Nguyễn Phúc Ánh, a descendant of the Nguyễn lord who was previously overthrown by the Tây Sơn. The war ended in 1802 when Nguyễn Phúc Ánh (now called Emperor Gia Long) defeated the Tây Sơn and reunited Đại Việt, then renamed the country to Vietnam.