During the 16th and 17th centuries there were a few large-scale fires that destroyed substantial parts of the town. Because the town was only 60 km north of the border between the Ottoman Empire and the Habsburg Monarchy, Topoľčany was often raided by the Ottoman Turks during the Ottoman wars in Europe, notably in the years 1599 and 1643, when many citizens were taken into slavery. The town's population stagnated as a result. The town's location in a lowland thus proved a disadvantage in times of war as the town never grew big enough to erect city walls.