In the 15th century Komárno had become very important. The rulers and the court of the kingdom of Hungary often stayed there. The fortress was very powerful and they managed to fight off Turkish invaders after the Turks had already captured Esztergom and Buda. The fort was badly damaged in 1783 in an earthquake, but it was built up again because of the Napoleonic wars.