Early Lý dynasty

The Early Lý dynasty (nhà Tiền Lý; chữ Nôm: ), also known in historiography as the Former Lý dynasty or Anterior Lý dynasty, officially Vạn Xuân (chữ Hán: ; "Myriad Spring"), was a dynasty of Vietnam that existed from AD 544 to 602. Its founder Lý Bí assumed the title of "Southern Emperor" (Lý Nam Đế). The capital was located at Long Biên within modern-day Hanoi.

Lý Bí and the Kingdom of Vạn Xuân
Lý Bí (503–548) was born in Thái Bình,(Sơn Tây). In 543, he and his brother Lý Thiên Bảo revolted against the Chinese Liang dynasty to gain independence. Many reasons are given for the motive of his revolt, among them the fact that he was a member of a wealthy family and, having failed an imperial examination, decided to revolt.

The sixth century was an important stage in the Vietnamese political evolution toward independence. During this period, the Vietnamese aristocracy, while retaining Chinese political and cultural forms, grew increasingly independent of China. At the same time, indigenous leaders arose who claimed power based on Vietnamese traditions of kingship. A series of failed revolts in the late sixth and early seventh centuries fueled the Vietnamese national consciousness. Lý Bí, the dynasty's founder, was himself descended from a Chinese family that had fled to the Red River Delta during a period of dynastic turbulence in the first century A.D.         Lý Bí declared himself emperor of Nam Việt in the tradition of Triệu Đà and organized an imperial court at Long Biên.

In 544, Lý Bí defeated the Liang dynasty, proclaimed himself emperor and named the country Vạn Xuân. At this time, he built the Trấn Quốc Pagoda in Hanoi.

Resistance against the Liang
In 545, Emperor Wu of Liang sent troops to recapture the region. In 546, Gia Ninh fortress fell, Lý Bí and his army fled and waged guerrilla warfare against the Liang.

While the Lý family retreated to the mountains and attempted to rule in the style of their Chinese overlords, a rebel leader who based his rule on an indigenous form of kingship arose in the Red River Delta. Triệu Quang Phục made his headquarters on an island in a vast swamp. From this refuge, he could strike without warning, seizing supplies from the Liang army and then slipping back into the labyrinthine channels of the swamp. According to a much later Vietnamese revolutionary, General Võ Nguyên Giáp, Vietnamese concepts of protracted warfare were born in the surprise offensives, night attacks, and hit-and-run tactics employed by Triệu Quang Phục.

Civil war
Shortly after Lý Thiên Bảo died, a Lý family member, Lý Phật Tử (Lý Thiên Bảo's cousin) made claim to the imperial throne and challenged Triệu Quang Phục. Both sides vied against one another and civil war broke out for the throne with no decisive victory. Wary about engaging in internal fighting that would only frustrate the people, Triệu Việt Vương negotiated a truce and peace. From Long Biên northward would be under Lý Phật Tử's rule and the land south of Long Biên would belong to Triệu Việt Vương.

In 571, Lý Phật Tử broke the truce and attacked Triệu Quang Phục's domain. Since Triệu Quang Phục's domain was not prepared or imagined Lý Phật Tử would attack, therefore they were easily defeated. His capital was sacked and burned by Lý Phật Tử's forces, however he managed to escape. During his retreat, Triệu Quang Phục committed suicide. Triệu Quang Phục's remaining forces and territories surrendered and were incorporated into Lý Phật Tử's domains.

Sui invasion
The newly Sui Empire defeated the Chen dynasty in 589, unifying China in the process. Emperor Wen of Sui sent envoy to Vạn Xuân, demanded Lý Phật Tử to submit as a vassal state, but Lý had refused. In 602, Lý Phật Tử brided money to governor of Qi Zhuo Lệnh Hồ Hy, Emperor Wen of Sui felt angry and executed Lệnh Hồ Hy for corruption. He ordered general Liu Fang invade Vạn Xuân with 100,000 troops. The emperor of Vạn Xuân (Lý Phật Tử) surrendered to the Sui, marking the beginning of renewed Chinese domination in Vietnam.

Anterior Lý dynasty monarchs

 * Lý Nam Đế I (r. 542–548) Lý Nam Đế's pre-throne name was Lý Bí, also known as Lý Bôn.
 * Lý Thiên Bảo (r. 548–555, co-reigned with Triệu Quang Phục)
 * Triệu Việt Vương (r. 548–571, 555–571 as sole ruler)
 * Lý Nam Đế II (Lý Phật Tử) (r. 571–602)
 * Lý Sư Lợi (603)