The town is first mentioned in historical documents from 1275. It obtained its city charter in 1325. The most important sight in the town is the royal castle built in the late 13th or early 14th century. It fell into ruin in the 18th century and remains in that state to this day (GNU Free Documentation License).