The Kingdom of Bosnia (Bosnian: Bosansko kraljevstvo, Босанско краљевство) was a medieval kingdom that evolved from the Banate of Bosnia (1154–1377). Its extensive, region-wide socio-economic, political and cultural influence was of great effect in the later development of medieval Balkan states, and Balkan history in general. Bosnia enjoyed de facto independence in the 13th and 14th centuries despite nominal subjection to Hungary. Its difficult terrain and remoteness enabled the Bosnians to maneuver between their two powerful neighbours, Hungary and Serbia, usually managing to avoid subordination to either. Several capable rulers allowed Bosnia briefly to play the role of great power in the 14th century. After 1290, Bosnia enjoyed virtual independence from Hungary and gained significant territory in Dalmatia at Serbia's expense.