Early Lê dynasty

The Early Lê dynasty or the Former Lê dynasty (; Hán Nôm: ; ) was a dynasty of Vietnam that existed from 980 to 1009. It followed the Đinh dynasty and was succeeded by the Lý dynasty. It comprised the reigns of three emperors.
Founding.
After the assassination of the emperor, Đinh Tiên Hoàng, and the emperor's first son, Đinh Liễn, the third son of the emperor, Đinh Phế Đế, assumed the throne at aged six with the regent Lê Hoàn. During the regency of Lê Hoàn, members of the imperial court skeptical of Lê Hoàn's loyalty to the true emperor, such as the Duke of Định Nguyễn Bặc and General Đinh Điền, led an army to the imperial palace in an attempted coup. The failure of the undertaking caused those two to be executed. 
In 980, the Song dynasty of China under Emperor Taizong ordered a Chinese army to invade Đại Cồ Việt. Because the young emperor was unable to lead the country against the invader, the mandarins of the imperial court discussed with Empress Dương Vân Nga about enthroning the most trusted general and regent, Lê Hoàn. Most of them voted in the affirmative to the plan; consequently, the empress dethroned her own son and gave the crown to Lê Hoàn. He accepted the emperorship, establishing a new dynasty named the Early Lê dynasty. Lê Hoàn is often referred to with the posthumous name Lê Đại Hành.
Lê Đại Hành (980–1005).
Following war threats from Song China, Lê Đại Hành made preparations for war while the Song forces advanced toward Đại Cồ Việt. Later at the Battle of Bạch Đằng River, Lê Đại Hành's forces, under the command of General Phạm Cự Lượng, were successful at halting the overland advance of the Song forces, although they incurred some losses. Seeking peace, Lê Đại Hành sent emissaries to negotiate for peace; thus the annual show of homage and offerings to the Celestial Emperor of China were resumed as a means to appease the Song dynasty.
In 982, Lê Đại Hành began expeditions to Champa, a nation south of Đại Cồ Việt. 
Lê Đại Hành's army met the combined forces of Champa, Chenla and Abbasid Mercenaries in Đồ Bàn, (Quảng Nam province today) and be able to defeated all of them. Champa king Paramesvaravarman I had been beheaded and Champa capital of Indrapura was sacked by the Vietnamese. The new king of Champa agreed to be a vassal state of Đại Cồ Việt in 983.
Some domestic achievements of Lê Đại Hành include constructing new monuments and galvanizing agricultural and handicraft production in order to make economic progress. Many spiritual etiquettes were developed, and Lê Đại Hành's government was the model for that of the succeeding dynasty.
Lê Đại Hành died in 1005 at the age of 65 and after 25 years of rule. In his will, Lê Đại Hành gave the throne to his youngest son, Lê Long Việt.
The succession crisis.
Lê Long Việt (1005).
Out of his many princes, Lê Hoàn appointed his first prince Lê Long Thâu as the crown prince in the early years of his rule. Thâu died in 1000, and Lê Hoàn was forced to choose another crown prince.
The fifth prince Duke of Khai Minh, Lê Long Đĩnh, nominated himself as crown prince. According to the Đại Việt sử ký toàn thư, Lê Hoàn viewed him as the favourable to become the next emperor, but imperial court mandarins suggested him not to do it because they viewed other candidates as more viable. Lê Hoàn followed the advice and chose his older brother Lê Long Việt, the duke of Nam Phong.
In 1005, Lê Hoàn died after reigning for 24 years at Trường Xuân Palace.
After the death, there was a succession dispute between the princes Lê Long Đĩnh, Lê Long Tích, and Lê Long Kính and crown prince Lê Long Việt, preventing a government to take control over the entire country for eight months. In the winter of 1005, Lê Long Tích was defeated by crown prince Lê Long Việt. He fled to Thạch Hà province, now Hà Tĩnh Province, and ordered the massacre of the locals there. After a few months, Lê Long Việt was able to proclaim himself emperor Lê Trung Tông but was assassinated after ruling for three days by Lê Long Đĩnh, who replaced him as emperor.
Lê Long Đĩnh (1005–1009).
Lê Long Đĩnh mustered large military forces, defeating the other princes.
After stabilizing his rule through war, he enhanced foreign relations with the Song dynasty with a gentle and friendly policy. The emperor gave full support for Buddhism and sought Chinese Buddhist canon and scripture for practice in Vietnam.
He also supervised the national economy and began the construction of bridges, roads, and other infrastructure for easy transportation of people and commodities, especially water. In 1009, he established the exchange of goods and products in Nanning with the Song dynasty, albeit it was limited as the Song emperor only allowed Vietnamese businessmen to trade at specific locations near the border like Hepu County, Guangxi.
Hemorrhoids.
The emperor was famous for suffering from hemorrhoids, which made him unable to sit on the throne and instead forced him to lie on his throne. His famous lying sessions earned him the name Lê Ngọa Triều throughout his reign, meaning "the one who rules while lying on the throne."
The rise of the Lý clan.
Despite his supposed achievements in diplomacy, religion, infrastructure, and the economy, Lê Long Đĩnh's rule was characterized by debaucheries, wild orgies, and decadence according to ancient sources, although modern historians have dismissed these stories as legend, while other historians compare him to the Roman Emperor Nero as he was well known for his cruelties, not the least of which was sadism and torture of not only many types of criminals but also his own relatives, with him only promoting and partaking in these infamous acts. 
According to these stories, his favorite execution and torturing methods were immersion, Lingchi, and the burning of live victims, all of which he perceived as entertainment. Although Buddhism played a key role in his life and politics, the emperor often used Buddhist monks for so-called entertainment such as by exfoliating sugar canes atop a monk's head until it began to bleed. Employing many corrupt or otherwise incompetent officials into important court positions only further encouraged these tendencies of the emperor.
As a result of the emperor's poor health, according to some sources, most power was actually controlled by one of the members of the Lý family Lý Công Uẩn. High resentment from the public and the imperial court culminated for a long period preceding Lê Long Đĩnh's death. After Lê Long Đĩnh died the court agreed to enthrone the high-rank mandarin and aristocrat Lý Công Uẩn as the new emperor under pressure from the public and from the Buddhist monks, thus ending the Early Lê Dynasty. In its place, the Lý dynasty ushered in a new age for Vietnam, with a combination of Confucian and Buddhist influences recurring in the new dynasty.
Domestic.
Administrative centre.
The Early Lê dynasty retained the traditional government form of the Đinh dynasty, although it modified some parts of it. In 980, Lê Hoàn appointed several men to court positions: Hồng Hiến as the grand chancellor, known in Vietnamese as Thái sư; Phạm Cự Lạng as the vice-chancellor, or Thái úy; Từ Mục as grand governor of court, Đại tổng quản; and Đinh Thừa Chinh as imperial capital interior military commander, in Vietnamese Nha nội đô chỉ huy sứ.
A major reform, however, was the distribution of specific duties and powers to each mandarin in contrast to the Đinh dynasty's centralizing all power to the emperor.
Rebellion oppression.
In the ruling era, Lê emperors often faced the revolts of some local Tribal chief and viceroy, especially in remote areas, retaining the specific authorization to quell them.
In 980, Lê Đại Hành ordered Dương Tiến Lộc to collect taxes from Hoan and Ái province, now Nghệ An Province and Thanh Hóa Province. However, Dương Tiến Lộc opposed it and seized the two provinces, proposing to place them under the control of the Kingdom of Champa, which refused him in order to maintain a friendly relationship with Đại Cồ Việt. Lê Đại Hành led an army to defeat and kill Lộc along with a general massacre of citizens in those two provinces.
This, however, is only an example of rebellion: there were more than ten rebellions against the imperial court during a reign of five years.
Transportation.
After victory over Champa in 983, Lê Đại Hành merged the seized territory into the country and started to build more roads from the south estuary to Quảng Bình Province at the south of his realm. Then he ordered the dredging of the Đa Cái canal in 1003. 
In 1009, the country started the massive construction of transportation infrastructure for trading among the regions and to facilitate travel for soldiers heading south.
Economy.
Taxation.
The Early Lê dynasty imposed taxation based on land property. Taxes included a public benefit tax, which was ten days' worth of labor for public projects; a household tax on property paid annually; and a military tax added to the household tax specifically for military operations, including public security at home. The taxation on property was borrowed from the Xia, Shang, and Zhou dynasties of China, only collecting goods and not money. Simultaneously, the government implementing trade-promoting policies by not taxing the property of traders except for land owned.
Agriculture.
Agriculture was the fundamental element of the economy of Đại Cồ Việt during the Early Lê dynasty. Most of the land of villages was under the control of the imperial court and owned by it by law.
Land was given one of four types. The emperor's land was cultivated with a spiritual significance, intended to have the people to take part in agricultural activities, mainly prisoners and peasants, with all products going to the imperial court; it was first implemented by Lê Đại Hành in 987. Meanwhile, distributive land was distributed to mandarins for the benefiting and contributing to the country or to princes as an accommodation. It was not private property and was returned to the imperial court when the landowner died. Religious land was set aside for the practices of Buddhist monks; private land was owned and sold freely between individuals without government interference. Besides that, the government encouraged subjects to exploit wild and untouched land by settling it, providing property at a lower cost while simultaneously expanding its influence in unsettled regions. Peasants shared the land equally and cultivate it, regularly paying taxes to the government for the government's budget.
Trade.
The emperors were focused on an open new trade route through roads and waterways. Records report that such infrastructure projects were undertaken mainly in the years 983, 1003, and 1009.
The main trade partner of Đại Cồ Việt was China, and both sides agreed to establish bilateral exchanging of goods at borders.
Some local high officials supported commercial activity among local parties. A delegation of Đại Cồ Việt acted as a government arbitrator in trade disputes. Some typical exports of Vietnam were gold, silver, and bronze products.
Culture.
There are not much sources describing the culture under Early Lê dynasty. However, it is known that Buddhism was the most widespread religion, affecting the flourishing of Buddhism in China's Tang dynasty. Monks were given an elevated status in government affairs, being allowed to participate in politics and national planning.
Foreign relations.
Song dynasty.
Đại Cồ Việt was a tributary state of the Song during the Early Lê dynasty, maintaining a delicate balance of peace with China and independence. Lê emperors, however, were sometimes threatened by the nomadic Khitan people in the north of China.
After a failed invasion in 981, the Song emperor accepted Lê Hoàn as the ruler of Đại Cồ Việt but just regarded him as the "Jiedushi", or regional military governor, of the Annam protectorate, as the Chinese called the Đại Cồ Việt.
Between 982 and 994, Lê Hoàn sent five tribute-bearing diplomatic envoys to the Song dynasty requesting title investiture.
In 986, Emperor Taizong of the Song dynasty appointed Lê Hoàn as "Annan duhu", or Superior Prefect of Annam. At the end of 993, the Song emperor appointed Lé Hoàn as "Giao Chi Quan Vuong", or King of Giao Chi, after being convinced of his future loyalty.
Champa.
The relation of Đại Cồ Việt in the north and Champa in the south was regarded as hostile. In 981, Lê Đại Hành sent an envoy to Champa, who was captured by them. The diplomatic incident sparked a war between the two countries.
In 982, Lê Hoàn victoriously took part in the campaign against Champa, killing the Cham king at the battlefield. Then he sacked the capital of Cham and captured a hundred soldiers and concubines along with one Indian monk, taking home precious goods such as gold and silver. Moreover, he burned the fortresses and tombs of former Champa kings. 
In 992, the Champa king Harivarman II sent an envoy to Đại Cồ Việt to ask for the release of 360 prisoners back to the homeland.