Duke Wilhelm V commissioned the Jesuit Michaelskirche, which became a centre for the counter-reformation, and also built the Hofbräuhaus for brewing brown beer in 1589. In 1623, during the Thirty Years' War, Munich became electoral residence when Maximilian I, Duke of Bavaria was invested with the electoral dignity, but in 1632 the city was occupied by Gustav II Adolph of Sweden.When the bubonic plague broke out in 16, about one third of the population died.Twenty years later, Landshut University was moved to Munich.Many of the city's finest buildings belong to this period and were built under the first three Bavarian kings.After the end of postwar American occupation in 1949, there was a great increase in population and economic power during the years of Wirtschaftswunder, or "economic miracle".
It derives from the monks of the Benedictine order, who ran a monastery at the place that was later to become the Old Town of Munich; hence the monk depicted on the city's coat of arms. Catholic Munich was a cultural stronghold of the Counter-Reformation and a political point of divergence during the resulting Thirty Years' War, but remained physically untouched despite an occupation by the Protestant Swedes.The arts and politics became increasingly influenced by the court (see Orlando di Lasso, Heinrich Schütz and later Mozart and Richard Wagner).During the 16th century, Munich was a centre of the German counter reformation, and also of renaissance arts.In the late 15th century, Munich underwent a revival of gothic arts: the Old Town Hall was enlarged, and Munich's largest gothic church – the Frauenkirche – now a cathedral, was constructed in only 20 years, starting in 1468.
When Bavaria was reunited in 1506, Munich became its capital.Munich hosts more than 530,000 people of foreign background, making up 37.7% of its population.