In 1826, the Ernestine duchies were reorganised after the last ruler of Saxe-Gotha-Altenburg died without an heir. The duke of Saxe-Hildburghausen gave up his duchy in return for becoming Duke of Saxe-Altenburg. Hildburghausen was given to Saxe-Meiningen. Hildburghausen was not one of the duchies in the Imperial circle, Altenburg was, so by swapping his land the duke gained in social rank, even though the Holy Roman Empire no longer existed