Rudolf II, 1552–1612, Holy Roman emperor (1576–1612), king of Bohemia (1575–1611) and of Hungary (1572–1608), son and successor of Holy Roman Emperor Maximilian II. Acceding to the Hapsburg lands, he reversed his father's tolerant policy toward Protestantism and gave assistance to the Counter Reformation. Although Rudolf was a learned man, he was incapable of ruling because he was plagued by melancholy and later became subject to occasional fits of insanity. Other members of his family began to intervene in imperial affairs. Following a revolt in Hungary (1604–6) by Stephen Bocskay and his Ottoman allies, most of the actual ruling power passed to Rudolf's brother Matthias; the revolt was provoked by Rudolf's attempt to impose Roman Catholicism in Hungary. In 1608, Matthias forced Rudolf to cede Hungary, Austria, and Moravia to him. Seeking to gain the support of the Bohemian estates, Rudolf issued (1609) a royal charter that guaranteed religious freedom to the nobles and cities. This effort was in vain, and Rudolf was forced to give up Bohemia to Matthias in 1611. Rudolf's turbulent reign was a prelude to the Thirty Years War.