It was an Imperial State in its own right, with a vote in the "Reichstag", for much of the 17th century until the extinction of its ruling line in 1672 when it was inherited by Ernest I the Pious, the Duke of Saxe-Gotha, who had married the heiress.