In 1241 and 1242 the Mongols fail to conquer the fortified castle and the town below it, but temporarily devastate the surrounding settlements. The castle is adapted after these attacks. After 1242 German colonists come to the town and gradually their number will increase, so that till the late 19th century they will represent by far the largest ethnic group in the town. In 1271 and 1273–1276 the town is captured by the King of Bohemia, Ottakar II in connection with fighting between Hungary and Bohemia because of Styria. In this connection, the (1st) Peace of Pressburg is signed in 1271.