general Lê Hoàn, as chief of the state. Lê Hoàn's rivals then attacked him but were defeated. The queen of the Dương family decided to replace the Đinh family with the Lê family of Lê Hoàn, and brought the crown from her six-year-old son Đinh Toàn (r. 979–980) to her mate Lê Hoàn (r. 980–1005) in 980. Disturbances in Đại Cồ Việt attracted attention from the Song dynasty. In 981, the Song Emperor launched an invasion of Đại Cồ Việt, but was repulsed by Lê Hoàn. In 982 he attacked Champa, killed the Cham king Paramesvaravarman I, and destroyed a Cham city. A Khmer inscription (c. 987) mentioned that in that year, some Vietnamese merchants or envoys arrived in Cambodia through the Mekong. After Lê Hoàn died in 1005, civil war broke out between crown princes Lê Long Việt, Lê Long Đĩnh, Lê Long Tích, and Lê Long Kính. Long Việt (r. 1005) was murdered by Long Đĩnh while after ruling for three days. As the Lê brothers fought each other, the Lý family-a member of the court's cadet, led by Lý Công Uẩn, quickly rose to power. Long Đĩnh (r. 1005–1009) ruled as a tyrant king and developed hemorrhoids. He died in November 1009. Lý Công Uẩn ascended the throne two days later, with support from the monks, as Lý Thái Tổ. Flourishing period Emperor Lý Thái Tổ (r. 1009–1028) moved the court to the abandoned city of Đại La, which had previously been a seat of power under the Tang dynasty, and renamed it to Thăng Long in 1010. The city became what is now present-day Hà Nội. To control and maintain the nation's wealth, in 1013 he created a taxation system per product. His reign was relatively peaceful, though he campaigned against the Han communities in Hà Giang massif and subdued them in 1014. He furthermore laid the basis of the stability Vietnamese state and his dynasty would rule the kingdom for the next 200 years. Lý Thái Tổ's son and grandson Lý Thái Tông (r. 1028–1053) and Lý Thánh Tông (r. 1054–1071) continued to strengthen the Viet state. Starting during the reign of Lê Hoàn, the Việt expansion extended Việt territories from the Red River Delta in all directions. The Vietnamese destroyed the Cham northern capital Inprapura in 982, raided and plundered Southern Chinese port cities in 995, 1028, 1036, 1059, and 1060; subdued the Nùng