The oldest ruins in Huế belong to the Kingdom of
Lâm Ấp, dating back to the 4th century AD. The ruins of its capital, the ancient city of Kandarpapura (lit. 'the city where Śiva burnt Kama'), is later located in Long Tho Hill, three kilometers to the west of the city. Kandarpapura might have only been established during the reign of
Kandarpadharma (r. 629–640) and it was named after the king, certainly it may be not the name of the capital of former Lâm Ấp kingdom. Another
Champa ruin in the vicinity, the ancient city of Hoa Chau is dated back to the 9th century. In 1306, the King of Champa,
Che Man offered Vietnam two Cham prefectures, Ô and Lý, in exchange for marriage with a Vietnamese (
Trần dynasty) princess named
Huyền Trân. The Vietnamese King
Trần Anh Tông accepted this offer. In 1592, the
Mạc dynasty was forced to flee to
Cao Bằng province and the
Lê emperors were enthroned as
de jure Vietnamese rulers under the leadership of Nguyễn Kim, the leader of Lê dynasty loyalists. Later, Kim was poisoned by a Mạc dynasty general which paved the way for his son-in-law,
Trịnh Kiểm, to take over the leadership. Kim's eldest son, Nguyen Uông, was also assassinated in order to secure Trịnh Kiểm's authority.
Nguyễn Hoàng, another son of
Nguyễn Kim, feared a fate like Nguyễn Uông's so he pretended to have a mental illness. He asked his sister Ngoc Bao, who was a wife of Trịnh Kiểm, to entreat Trịnh Kiểm to let Nguyễn Hoàng govern Thuận Hóa, the furthest south region of Vietnam at that time. Because Mạc dynasty loyalists were revolting in Thuận Hóa, and Trịnh Kiểm was busy fighting the Mạc dynasty's forces in northern Vietnam during this time, Ngoc Bao's request was approved, and Nguyễn Hoàng went south. After Hoàng pacified Thuận Hóa, he and his heir
Nguyễn Phúc Nguyên secretly made this region loyal to the Nguyễn family; then they rose against the Trịnh lords. Vietnam erupted into a
new civil war between two
de facto ruling families: the clan of the
Nguyễn lords and the clan of the
Trịnh lords.
Tây Sơn rebellions broke out in 1771 and occupied an area from
Quy Nhon to
Bình Thuận province, thereby weakening the authority and power of the Nguyễn lords. While the war between Tây Sơn rebellion and Nguyễn lord was being fought, the Trịnh lords sent south an army and captured Phú Xuân in 1775. After the capture of Phú Xuân, the Trịnh lords' general
Hoàng Ngũ Phúc made a tactical alliance with Tây Sơn and withdrew almost all troops to
Tonkin and left some troops in Phú Xuân. In 1786, Tây Sơn rebellion defeated the Trịnh garrison and occupied Phú Xuân. Under the reign of the emperor
Quang Trung, Phú Xuân became the Tây Sơn dynasty capital. In 1802,
Nguyen Ánh, a successor of the Nguyễn lords, recaptured Phú Xuân and unified the country. Nguyễn Ánh rebuilt the citadel entirely and made it the
Imperial City capital of all of Vietnam. Nguyễn Phúc Ánh (later Emperor
Gia Long) succeeded in establishing his control over the whole of
Vietnam, thereby making Huế the national capital. The second emperor of the Nguyễn dynasty to rule from Huế, reigning from his birthday on 14 February 1820 until his death, on 20 January 1841 was
Minh Mạng. He was a younger son of Emperor
Gia Long, whose eldest son, Crown Prince Cảnh, had died in 1801. Minh Mạng was known for his opposition to French involvement in Vietnam, and for his rigid
Confucian orthodoxy. After the
French conquest of Vietnam, Phú Xuân was officially renamed to Huế in 1899. It remained the capital of
Annam, one of
French Indochina's six constituent regions, until the
State of Vietnam was established in 1949. Prior to 1975, the province was known simply as
Thừa Thiên. During the
French colonial period, Huế was in the
protectorate of Annam. It remained the seat of the Imperial Palace until 1945, when Emperor
Bảo Đại abdicated and the
Democratic Republic of Vietnam (DRV) government was established with its capital at Ha Noi (
Hanoi), in the north. While Bảo Đại was proclaimed "Head of the
State of Vietnam" with the help of the returning French colonialists in 1949, his new capital was
Saigon, in the south. The city underwent fighting during the
Vietnam War, as it was the second-most northerly province of the
South Vietnam, close to the
North Vietnamese border (
DMZ) at the
17th parallel. 2,893 U.S. soldiers died in Huế, more than in any other Vietnamese province. After the war's
conclusion in 1975, some of the historic features of Huế were neglected because they were seen by the victorious communist regime and some other Vietnamese as "relics from the feudal regime"; the
Communist Party of Vietnam (then Workers' Party of Vietnam) doctrine described the Nguyễn dynasty as "feudal" and "reactionary". With the adoption of
liberalizing reforms, these hostile policies have been abandoned. Some of the city's historic areas and buildings are undergoing restoration, including the full reconstruction of
Kien Trung Palace in 2024, and the city is developing into a tourism and transportation hub for central Vietnam. In recognition of Huế's rapid development, the city became Vietnam's sixth
centrally-governed municipality in 2025. As part of this process, Huế was merged with the rest of Thừa Thiên Huế province to streamline administration. The
National Assembly of Vietnam voted and passed a resolution to establish Huế city as a
direct-controlled municipality, comprising the entirety of Thừa Thiên Huế province. At the same time, the former
provincial city Huế was divided into two new districts,
Phú Xuân district and
Thuận Hóa district. Huế municipality officially came into operation in 2025. ==Geography==