 At that point the two lines were joined in personal union until the end of the Holy Roman Empire.In 1805, after the Peace of Pressburg, the then-elector, Maximilian Joseph, raised himself to the dignity of King of Bavaria, and the Holy Roman Empire was abolished the year after.The Electorate of Bavaria consisted of most of the modern regions of Upper Bavaria, Lower Bavaria, and the Upper Palatinate.