Grand Duchy of Baden came into existence through the dissolution of the Holy Roman Empire in 1803–06 and remained a sovereign country until it joined the German Empire in 1871, remaining a Grand Duchy until 1918 when it became part of the Weimar Republic as the Republic of Baden. Baden was bounded to the north by the Kingdom of Bavaria and the Grand Duchy of Hessen-Darmstadt; to the west and practically throughout its whole length by the River Rhine, which separated it from the Bavarian Rhenish Palatinate and Alsace in modern France ; to the south by Switzerland, and to the east by the Kingdom of Württemberg, the Principality of Hohenzollern-Sigmaringen and partly by Bavaria. Cf. Wikipedia article on the Grand Duchy of Baden