Bálint Balassi, the most important Hungarian poet of the century married Krisztina Dobó at the castle; the bride was the daughter of István Dobó, who defended the castle of Eger against the Ottoman Turks. Later the castle was owned by the Rákóczi family. The residents of the town took an active part in the revolution and war of independence against Habsburg rule led by Francis II Rákóczi between 1703 and 1711.