First mentioned in 698 but dating back to Roman times, when the valley was used for viticulture, Vianden (Veianen in Luxembourgish) gained its charter way back in 1308 and developed as a major leather and crafts centre. Its craftspeople had formed their own guilds by the late 15th century, by which stage the county of Vianden had become part of the greater Nassau lands.
In the 1790s, like the rest of Luxembourg, Vianden was swallowed by revolutionary France, but after 1815 when the French withdrew, a large part of the county was given to Prussia. Vianden itself was left an impoverished backwater cut off from its traditional hinterland. Trade died off and many townsfolk were forced to seek work as travelling minstrels. Meanwhile, the Dutch king who’d been handed the town saw little use in its gigantic, hard-to-heat castle. In 1820 he sold it to a scrap merchant who stripped out and flogged any marketable building materials. What remained of the castle fell into ruin despite occasional attempts to shore up the walls. French writer Victor Hugo visited in 1862 and 1865, before living here for three months in 1871; the town has a literary museum dedicated to him.
It wasn't until 1977, when the Grand Ducal family formally gave the castle to the Luxembourg state, that long-term restoration finally went ahead. The result was spectacular and the castle has since been not only a tourist magnet but also the backdrop set for several movies.