The history of the city of Quang Tri is inextricably linked with the southward expansion of the Vietnamese state. Originally, these territories were part of the ancient Champa Kingdom, but the settlement began to form as a significant Vietnamese administrative center in the early 19th century. The official milestone for the city's foundation in its historical form is considered to be 1809, when a fortress was established here by order of Emperor Gia Long.
Initially, the Citadel's fortifications were made of earth, but in 1837, under Emperor Minh Mang, it was rebuilt with brick. This event finalized Quang Tri's status as the provincial capital. The settlement's transformation into a major regional center was also due to its favorable geography: its location on the banks of the Thach Han (Thạch Hãn) River provided a link to the sea and inland areas, fostering the development of transport and trade.
Through the choice of the Nguyen Dynasty, the city became a hub of administrative and military power. The fortress was built according to the advanced fortification standards of the time, incorporating elements of the Vauban style. Administrative buildings and barracks were located within the walls, while residential quarters and markets formed around them. During this period, the city's economy was based on servicing the garrison and trading rice, while cultural life was steeped in the traditions of Imperial Vietnam.