Hanoi traced its history back to the third century BCE, when a portion of the modern-day city served as the capital of the historic Vietnamese nation of Âu Lạc. Following the collapse of Âu Lạc, the city was part of Han China. In 1010, Vietnamese emperor Lý Thái Tổ established the capital of the imperial Vietnamese nation Đại Việt in modern-day central Hanoi, naming the city Thăng Long (literally "Ascending Dragon"). Thăng Long remained Đại Việt's political centre until 1802, when the Nguyễn dynasty, the last imperial Vietnamese dynasty, moved the capital to Huế. The city was renamed Hanoi in 1831, and served as the capital of French Indochina from 1902 to 1945. On 6 January 1946, the National Assembly of the Democratic Republic of Vietnam designated Hanoi as the capital of the newly-independent country, which would last during the First Indochina War (1946–1954) and the Vietnam War (1955–1975). Hanoi has been the capital of the Socialist Republic of Vietnam since 1976.