 The fortress was known as Chorniy Grad (Slavic term for 'black castle') and served as a Bulgarian-Slavic guard outpost.Later King Stephen (1000–1038) made the town a state administration center, giving its name to a county.It remained a county seat till the Mongol invasion of Hungary (1240–42).