When Countess Margarete of Tyrol married the Bavarian, Duke Louis V the Brandenburger, in 1342, Kitzbühel was temporarily united with the County of Tyrol (that in turn became a Bavarian dominion as a result of the marriage until Louis' death). After the Peace of Schärding (1369) Kitzbühel was returned to Bavaria. Following the division of Bavaria, Kufstein went to the Landshut line of the House of Wittelsbach. During this time, silver and copper mining in Kitzbühel expanded steadily and comprehensive mining rights were issued to her that, later, were to become significant to the Bavarian dukedom. On 30 June 1504 Kitzbühel became a part of Tyrol permanently: the Emperor Maximilian reserved to himself the hitherto Landshut offices ("Ämter") of Kitzbühel, Kufstein and Rattenberg as a part of his Cologne Arbitration ("Kölner Schiedsspruch"), that had ended the Landshut War of Succession.