 In 1814, as a result of the Congress of Vienna, the territories of the Principality of Aschaffenburg and Grand Duchy of Würzburg went to the Kingdom of Bavaria.In order to merge the patchwork quilt of small states in Franconia and Swabia into a greater Bavaria, Maximilian Joseph Montgelas reformed the political structure.Out of this in January 1838 emerged the Franconian provinces with their present names of Middle, Upper and Lower Franconia.