During the mid-12th century, the Banate of Bosnia emerged under its first ruler Ban Borić. After Ban Kulin Bosnia was by practical means an independent state, but that was constantly challenged by Hungarian kings who tried to reestablish its authority.
