 Initially it was part of the medieval Duchy of St. Sava (), established by duke (, ) Stefan Vukčić Kosača within the Kingdom of Bosnia.After the Ottoman conquest, it was part of the Sanjak of Herzegovina.Between 1580 and 1833, Sanjak of Herzegovina was part of the Bosnia Eyalet, and then became a separate Herzegovina Eyalet (1833–1851), of the Ottoman Empire.