The Croato-Hungarian state was a very significant factor in the area between the German and Byzantine Empires and as well as a rival to the strengthened Historical development of Croatia Venetian state on the Adriatic Sea. The Croats and Hungarians resisted all surrounding enemies together, and in the middle of the 13th century they succeeded in surviving the great Tatar invasions. After the withdrawal of the Tatars the construction of many fortresses commenced, the local nobility began to strengthen and the first free royal boroughs were pro- claimed. Among the latter, Zagreb became increasingly prominent as an economic center of Slavonia, and since the sixteenth century of all of Croatia as well. Among the Croatian feudal magnates, the most significant were the Krk princes, later called the Frankopans, and the ,Subici, later called the Zrinski's. Their large estates, which were like states, were almost independent of the king, and frequently it was precisely these nobles who decided on the fate of Croatia and the entire kingdom.
From the twelfth century Bosnia began to increasingly disassociate itself from the Croato-Hungarian state as a separate banate. It expanded territorially at the expense of Croatia, and at the end of the fourteenth century it became a kingdom under Tvrtko (1377). Bosnia was a western-oriented, Catholic kingdom which became a buffer-state between Catholic Croatia and Orthodox Serbia. A specific religious community also began to expand in Bosnia, called the "krstjani", which the pope and the Croato- Hungarian rulers considered heretical, often sending armies of Crusaders against them. In the territory of southern Dalmatia, which is also referred to as Red Croatia in some sources, one more small Croatian state was formed, expanding through trade and maritime activities. This was the Dubrovnik Republic, which was established on the location of ancient Ragusa. For centuries it recognized the rule of Constantinople, the Croato-Hungarian state and Turkey, but in reality it was independent and traded from the Levant to Great Britain. Dubrovnik was a center, actually the focal point, of Croatian culture, literature and art, and is picturesquely referred to as the Croatian Athens because of this. After the last of the first Croato-Hungarian dynasty, the Arpads, died without leaving an heir, the Croatian Subic princes brought Charles Robert of the French Anjou dynasty to the throne. King Charles and his heir, Louis, crushed the Croatian and Hungarian nobility and created a strong state. Louis defeated Venice and at the Peace of Zadar in 1358 he returned the entire Croatian Adriatic coast under his rule, as well as placing Croatian Dubrovnik under his protection.
Through dynastic inheritance he obtained the administration of Poland and Lithuania and thus created the first Central European state from the Baltic to the Adriatic. After his death a period of anarchy and civil war commenced, in which one of the Anjous sold a part of Dalmatia to Venice in 1409. The feudal anarchy in Byzantium and in the Balkans was exploited by the Turks, who conquered 383 Constantinople (1453), Serbia, Bosnia (1463) and Herzegovina. After this Croatia and Hungary were next in line, and their armies were defeated in Krbava in Croatia in 1493 and Mohacs in Hungary in 1526. The only real power that could organize a suitable defense against the Turks was the Habsburgs, at that time the dukes of Austria and concurrently the Holy Roman emperors and Spanish kings. Because of this, the Croats, of their own free will, chose Ferdinand of Habsburg, the brother of Charles V, as their king in 1527. After a civil war and some resistance this was also done by the Hungarians, who together with the Croats entered the Habsburg state as the most threatened nations on the first defensive lines of Central Europe. The hundred year Croatian struggle for its existence began (1493-1593).