The Principality of Leyen was a NapoleonicGerman state which existed 1806–14 in Hohengeroldseck, in the west of modern Baden-Württemberg. The House of Leyen had acquired many districts in western Germany, and eventually these were inherited by the Leyen line of counts at Adendorf. In 1797, France defeated the Holy Roman Empire and all lands west of the Rhine were lost. Following the defeat of Austria in 1806, Count Philip Francis of Adendorf was raised to a Prince, and his lands were renamed to the 'Principality of Leyen'. The territory formed an enclave surrounded by Baden. Prince Philip Francis, like many other members of the Confederation of the Rhine became largely a French puppet, so following Napoleon's defeat at the Battle of Leipzig in 1813, the Congress of Vienna opted to mediatise his realm and give it to Austria. In 1819, Austria traded it to Baden.