The principalities of Serbia and Croatia split control of Bosnia and Herzegovina in the 9th and 10th centuries, but by the High Middle Ages political circumstance led to the area being contested between the Kingdom of Hungary and the Byzantine Empire.