People have lived here since the Neolithic age. The Slavs started to move here in the 5th century. German colonists started to live here since the 13th century. When the Hussites burned the city down, it declined it for some time. It regained its position in the 19th century, when it became an important railway junction. Today, it is the fifth largest town in Slovakia and the third most important industrial centre in Slovakia.