Hanoi has been inhabited since at least 3000 BC. One of the first known permanent settlements is the Co Loa citadel (C? Loa) founded around 200 BC.

Hanoi has had many names throughout history, all of them of Sino-Vietnamese origin. During the Chinese domination of Vietnam, it was known as T?ng Bình (??) and later Long ?? (??; literally “dragon’s belly”). In 866, it was turned into a citadel and was named ??i La (??).

In 1010, Lý Thái T?, the first ruler of the Lý Dynasty, moved the capital of ??i Vi?t (??, the Great Viet, then the name of Vietnam) to the site of the ??i La Citadel. Claiming to have seen a dragon ascending the Red River, he renamed it Th?ng Long (??, Ascending dragon) – a name still used poetically to this day. It remained the capital of Vietnam until 1397, when the capital was moved to Thanh Hóa, also known as Tây ?ô (??, Western Capital). Th?ng Long then became ?ông ?ô (??, Eastern Capital).

In 1408, Chinese Ming Dynasty attacked and occupied Vietnam, then they renamed ?ông ?ô as ?ông Quan (??, Eastern Gateway). In 1428, Vietnamese overthrown the Chinese under the leadership of Lê L?i who later founded the posterior Lê Dynasty and renamed ?ông Quan as ?ông Kinh (??, Eastern Capital – the name known to Europeans as Tonkin. The same characters are used for Tokyo, Japan). Right after the end of Tây S?n Dynasty, it was named B?c Thành (??, Northern Citadel).

In 1802, when the Nguy?n Dynasty was established and then moved the capital down to Hu?, the name of Th?ng Long (??, “ascending dragon”) was modified to become different Th?ng Long (??, to ascend and flourish). In 1831 the Nguy?n emperor Minh M?ng renamed it “Hà N?i” (??, can be translated as Between Rivers or River Interior) . Hanoi was occupied by the French in 1873 and passed to them ten years later. It became the capital of French Indochina after 1887.

The city was occupied by the Japanese in 1940, and liberated in 1945, when it briefly became the seat of the Viet Minh government after Ho Chi Minh proclaimed the independence of Vietnam. But the French came back and reoccupied the city in 1946. After nine years of fighting between the French and Viet Minh forces, Hanoi became the capital of an independent North Vietnam in 1954.

During the Vietnam War Hanoi’s transportation facilities were disrupted by the bombing of bridges and railways, which were, however, promptly repaired. Following the end of the war, Hanoi became the capital of Vietnam when North and South Vietnam were reunited on July 2, 1976.

On May 29, 2008, it was decided that Ha Tay Province, V?nh Phúc’s Mê Linh district and 4 communes of L??ng S?n District, Hoa Binh is merged into the metropolitan area of Hanoi from August 1, 2008. Hanoi’s total area increased to 334,470 hectares divided into 29 subdivisions… with the new population being 6,232,940.The Hanoi Capital Region (Vùng Th? ?ô Hà N?i), a metropolitan area covering Hanoi and 6 surrounding provinces under planning will have an area of 13,436 square kilometers with a population of 15 million by 2020.

On August 1, 2008, Hanoi absorbed the neighboring province of Ha Tay, V?nh Phúc’s Mê Linh district, and four communes from L??ng S?n, Hoa Binh, effectively tripling its size.