In the early Middle Ages, a royal fort (castrum) was built on the site of a prehistoric settlement on Gradec Hill; the fort was destroyed during the Tatar invasion. At the time of the migrations which followed the Tatar incursions, King Bela IV established a system of royal free towns with special privileges throughout his kingdom, trying to attract new settlers. One of these towns was Gradec. The royal charter with a gold seal, the Golden Bull (1242), granted all the king’s subjects in Gradec, citizens and newly-arrived tradesmen, various privileges. As a result, the indigenous population - the Croats - were joined by immigrants from the neighbouring countries - other Slavs, Hungarians, Germans and Italians. Thus Gradec developed into an international community typical of medieval Europe.
The new royal town was built according to a plan: it was encircled by a wall that followed the natural configuration of the site and a church was erected in the central square - the parish church of St. Mark. At the same time, the canons, fearing another Tatar invasion, obtained permission to build a tower on Gradec - Popov turen (Priest's Tower).
Every year on St. Blaise’s Day (3 February) the inhabitants of Gradec elected the members of the town council. The king had also granted Gradec large tracts of land with subjects, serfs. In the 13th and 14th centuries, Gradec was a lively market-town with regular daily and annual St. Mark’s Fairs (from 1256) and St. Margaret’s Fairs (from 1372). Situated at the crossroads of the routes to Hungary and the Adriatic, the town soon became the dynamic centre of Slavonia. It had a royal palace (1335), a pharmacy (1355), and a school with a salaried teacher (1360). From 1363 until the 18th century, Gradec regularly hosted the tournament of tilting at the ring.