The town is located on the Danubian Lowland, on the Nitra River, at an altitude of 119 metres. It is located around 100 km from Bratislava and around 25 km from the Hungarian border. It is a road and railway hub of southern Slovakia. The town is famous for its history. A fortress was built, against the Ottoman Turks, on the site of an older settlement in the years 1573-81. The town developed around the fortress. The huge new fortress was one of the most modern fortresses in Europe when it was built, a prime example of the star fortress which was considered to be adapted to the advance in artillery in the preceding centuries.