The year 1158 is assumed to be the foundation date, which is only the earliest date the city is mentioned in a document. The document was signed in Augsburg. By that time the Guelph Henry the Lion, Duke of Saxony and Bavaria, had built a bridge over the river Isar next to a settlement of Benedictine monks�this was on the Salt Route and a toll bridge.
In 1175, Munich was officially granted city status and received fortification. In 1180, with the trial of Henry the Lion, Otto I Wittelsbach became Duke of Bavaria and Munich was handed over to the Bishop of Freising. (Wittelsbach's heirs, the Wittelsbach dynasty, would rule Bavaria until 1918.) In 1240, Munich was transferred to Otto II Wittelsbach and in 1255, when the Duchy of Bavaria was split in two, Munich became the ducal residence of Upper Bavaria.
Duke Louis IV was elected German king in 1314 and crowned as Holy Roman Emperor in 1328. He strengthened the city's position by granting it the salt monopoly, thus assuring it of additional income. In the late 15th century Munich underwent a revival of gothic arts�the Old Town Hall was enlarged, and Munich's largest gothic church, now a cathedral�the Frauenkirche�constructed in only twenty years, starting in 1468.
When Bavaria was reunited in 1506, Munich became its capital. The arts and politics became increasingly influenced by the court (see Orlando di Lasso, Heinrich Schuetz and later Mozart and Richard Wagner). During the 16th century Munich was a centre of the German counter reformation, and also of renaissance arts. 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. The Catholic League was founded in Munich in 1609. 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