The Tây Sơn dynasty ended the century-long war between the Trịnh and Nguyễn families, fought off an attack by Qing China, and united the country for the first time in 200 years. Under the most prominent of the Tây Sơn brothers, Nguyễn Huệ (regnal title Quang Trung), Vietnam experienced an age of relative peace and prosperity. His heir, however, was not capable of properly ruling the country, allowing the exiled Nguyễn lord Nguyễn Ánh to retake the south of Vietnam and eventually pave the way for his own imperial dynasty, the Nguyễn dynasty.