The village already existed in the Árpádian period. According to legend, in 1241 King Béla IV found refuge there one night when he had to flee after bloody battle of Mohi against the Tatars. Tradition holds that the King's daughter, St. Margaret, built the Margaret Chapel on the summit of Karancs to commemorate this famous event.