Đại Việt, often known as Annam, was a monarchy in eastern Mainland Southeast Asia from the 10th century AD to the early 19th century, centered around the region of present-day Hanoi, Northern Vietnam. Its early name, Đại Cồ Việt, was established in 968 by Vietnamese ruler Đinh Bộ Lĩnh after he ended the Anarchy of the 12 Warlords, until the beginning of the reign of Lý Thánh Tông, the third emperor of the Lý dynasty. Đại Việt lasted until the reign of Gia Long, the first emperor of the Nguyễn dynasty, when the name was changed to Việt Nam.