Town of Grobnik has been inhabited since the prehistoric times. The Battle of Grobnik field is a legendary battle that supposedly occurred in 1242 between the Croats and the Mongols of the Golden Horde in the area below the Grobnik Castle. The legend was recorded as late as the 16th century. Legend has it that, in a last-ditch struggle, Croats from all over the region gathered at the field and killed thousands of Mongols, who withdrew, never to return. The later Illyrian settlers of Grobnik were conquered by Romans who constructed a more robust fortification for defense against barbarians, during the great movement of the peoples. Subsequently the town felt into the hands of Goths and Franks. From the 10th century onward it has been a part of Croatian state. In 1225 it came to be ruled by the Counts of Krk, that have called themselves Frankopans ever since the 15th century. The names of Grobnik and its representatives are mentioned in 1288 within one of the most significant legal documents of feudal Europe, the Vinodol Code, that was composed in Glagolitic alphabet and written in Croatian language. During the 15th and 16th centuries, life in Town of Grobnik is characterized by the numerous Ottoman incursions. Town of Grobnik now came to be ruled by Zrinski family, actually the relatives of Frankopans. In 1671 then very rich Town of Grobnik was robbed and turned over to Austrian-Hungarian chamber.