The Treaty of Munich was signed in 1628 between Holy Roman Emperor Ferdinand II and Duke Maximilian of Bavaria. Based on the terms of the treaty, Ferdinand guaranteed Maximilian dignity as a prince-elector. Moreover, the Emperor allowed Maximilian to control for thirty years the right bank of the Rhine River and the Upper Palatinate.