Bavaria is a free state and one of 16 federal states of Germany. Located in the German southeast with an area of 70,548 square kilometres, Bavaria is the largest German state. Its territory comprises roughly a fifth of the total land area of Germany, and, with 12.9 million inhabitants, it is Germanys second most populous state. Munich, Bavarias capital and largest city, is the third largest city in Germany. The history of Bavaria stretches from its earliest settlement and formation as a duchy in the 6th century CE through the Holy Roman Empire to becoming an independent kingdom and finally a state of the Federal Republic of Germany. The Duchy of Bavaria dates back to the year 555. In the 17th century CE, the Duke of Bavaria became a Prince-elector of the Holy Roman Empire. The Kingdom of Bavaria existed from 1806 to 1918, when Bavaria became a republic. In 1946, the Free State of Bavaria re-organised itself on democratic lines after the Second World War. Bavaria has a unique culture, largely because of the states Catholic majority and conservative traditions. Bavarians have traditionally been proud of their culture, which includes festivals such as Oktoberfest and elements of Alpine symbolism. The state also has the second largest economy among the German states by GDP figures, giving it a status as a rather wealthy German region. Modern Bavaria also includes parts of the historical regions of Franconia, Upper Palatinate and Swabia.