It is located on the karst plateau of Mirotinske grede, near the village of Klobuk, Trebinje, in the Republic of Srpska entity of Bosnia and Herzegovina.
In the work of Constantine Porphyrogenitus De Administrando Imperio in the middle of the 10th century, he mentions a town in the parish of Vrm in the county of Travunija.
[2] The town of Klobuk was part of the state of Nemanjić until 1321, when this area passed into the hands of Bosnian rulers.
The fortress gained importance after the Peace of Karlovac in 1699, when it became a prominent point towards the possessions of Venetia in Dalmatia and towards Montenegro.
Inside Klobuk, in front of the former church, on the foundations of which the mosque was built, there is a stećak tombstone of the nobleman Vukosav Zemlić,[6] on which it is inscribed „Асе лежи Вукосав Землић”.