Thăng Long
The next blows came from the south, and then from the north. Between 1371 and 1383 the Cham king Chế Bồng Nga sacked the capital again and again, and in 1397 Hồ Quý Ly moved the court away to Thanh Hóa. Ming armies conquered Đại Việt soon after and ruled from the city they called Đông Quan, until Lê Lợi's uprising drove them out in 1427. He made it his capital once more and named it Đông Kinh, the Eastern Capital, from which Europeans took the name Tonkin.
The Lê reigned here until 1789, but often in name only. The Mạc seized the city in 1527 and held it until 1592, and after the Lê returned, the Trịnh lords governed from Đông Kinh in the kings' name for almost two hundred years. In 1789 the Tây Sơn moved the capital south to Huế, and in 1831 the Nguyễn emperor Minh Mạng renamed the old city Hà Nội, "within the rivers".