Charles XII's sister, Ulrika Eleonora, had now inherited the throne but she was forced by the Estates to sign the 1719 Instrument of Government, which ended the absolute monarchy and made the Riksdag of the Estates the highest organ of the state and reduced the role of monarch to a figurehead. The Age of Liberty () with its parliamentary rule, dominated by two parties – the Caps and the Hats – had begun. Ulrika Eleonora had had enough after a year on the throne and abdicated in favor of her husband, Frederick, who had little interest in the affairs of state and was elected King by the Estates as King Frederick I, resulting in the 1720 Instrument of Government: content-wise almost identical to the one from 1719. Despite having many extra-marital affairs, Frederick I never sired a legitimate heir to the throne.