The area of the Holy Cross Mountains was almost unpopulated until the 11th century when the first hunters established permanent settlements at the outskirts of the mountains. They needed a place to trade furs and meat for grain and other necessary products, and so the market of Kielce was formed. In the early 12th century the new settlement became a property of the Bishops of Kraków, who built a wooden church and a manor. In 1171 a stone church was erected by bishop Gedeon Gryf. During the times of Wincenty Kadłubek a parochial school in Kielce was opened in 1229. By 1295 the town was granted city rights. In the mid-13th century the town was destroyed by the Mongol invasion of Ögedei Khan, but it quickly recovered.