The Kingdom of Bosnia (Bosnian: Bosansko kraljevstvo, kraljevina Bosna/ Босанско краљевство, краљевина Босна) was a medieval kingdom that evolved from the Banate of Bosnia (1154–1377). Bosnia enjoyed de facto independence in the 13th and 14th centuries despite being a part of the Hungarian Crown Lands. Its difficult terrain and remoteness enabled the Bosnians to maneuver between their two powerful neighbors, Hungary and Serbia, usually managing to avoid subordination to either. Several capable rulers allowed Bosnia briefly to play the role of a regional power in the 14th century. After 1290, Bosnia enjoyed virtual independence from Hungary and gained significant territory in Dalmatia at Serbia's expense. King Tvrtko I (r. 1353–91) acquired portions of western Serbia and most of the Adriatic coast south of the Neretva river: during the latter part of his reign, Bosnia briefly became the strongest state in the Balkans peninsula. However, feudal fragmentation remained strong in Bosnia, and after his death the country lost its importance. The Ottoman Empire annexed portions of eastern Bosnia in the 1440s and 1450s, and went on to conquer Herzegovina until the last fortress fell in 1481.