The Imperial City is a walled palace within the citadel, in the city of Huế. Construction began in 1804, when thousands of workers were commissioned to produce a wall and moat, 10 kilometers long. Initially the walls were of earth, but were later replaced by stone walls, 2 meters thick.