The history of tracht in the 19th century is inseparable from the history of the movement in German-speaking countries to promote folk costume ("Trachtenbewegung"). The idea of an approved folk costume dates back to the 18th century, and was promoted by the Swedish king Gustav III. At the beginning of the 19th century, enthusiasm for the different costumes of the rural population developed at the royal courts of Bavaria and Austria. The interest in traditional costume was part of a wider cultural response to the humiliations suffered through the repeated foreign invasions during the Napoleonic Wars. The German-speaking peoples investigated their cultural heritage as a reaffirmation of their identity. The result was a flowering of research and artistic work centred around Germanic cultural traditions, expressed in painting, literature, architecture, music and promotion of German language and folklore.