In 618 AD, Li Yuan and his sons, members of the aristocratic Guanlong elite, seized their opportunity amid the chaos at the end of the Sui dynasty and rose above their rivals to establish the Tang dynasty. During nearly a decade of wars to unify China in the early Tang, the Li Tang regime overcame one obstacle after another, ultimately defeating all its rivals and uniting the realm. The Tang rose like a bright red sun.