The Electoral Palatinate () or the Palatinate (), officially the Electorate of the Palatinate (), was a state that was part of the Holy Roman Empire. The electorate had its origins under the rulership of the Counts Palatine of Lotharingia from 915, it was then restructured under the Counts Palatine of the Rhine in 1085. These counts palatine of the Rhine would serve as prince-electors () from "time immemorial", and were noted as such in a papal letter of 1261, they were confirmed as electors by the Golden Bull of 1356. The territory stretched from the left bank of the Upper Rhine, from the Hunsrück mountain range in what is today the Palatinate region in the German federal state of Rhineland-Palatinate and the adjacent parts of the French regions of Alsace and Lorraine (bailiwick of Seltz from 1418 to 1766) to the opposite territory on the east bank of the Rhine in present-day Hesse and Baden-Württemberg up to the Odenwald range and the southern Kraichgau region, containing the capital cities of Heidelberg and Mannheim. The counts palatine of the Rhine held the office of imperial vicars in the territories under Frankish law (in Franconia, Swabia and the Rhineland) and ranked among the most significant secular Princes of the Holy Roman Empire. In 1541 elector Otto Henry converted to Lutheranism. Their climax and decline is marked by the rule of Elector Palatine Frederick V, whose coronation as king of Bohemia in 1619 sparked the Thirty Years' War. After the 1648 Peace of Westphalia, the ravaged lands were further afflicted by the "Reunion" campaigns launched by King Louis XIV of France, culminating in the Nine Years' War (1688–97). Ruled in personal union with the Electorate of Bavaria from 1777, the Palatinate was finally disestablished with the German mediatization and annexation by Baden on 27 April 1803. History Background The comital office of Count Palatine at the Frankish court of King Childebert I was already mentioned about 535. The Counts Palatine were the permanent representatives of the King in particular geographic areas, in contrast to the semi-independent authority of the dukes (and their successors). Under the Merovingian dynasty, the position had been a purely appointed one, but by the Middle Ages had evolved into an hereditary one. Up to the tenth century, the Frankish empire was centered at the royal palace () in Aachen, in what had become the Carolingian kingdom of Lotharingia.