the first written mention is from 1237 in a document of King Béla IV. It was part of the Hont County, and was capital. It was part of Hungary.