 It is situated northeast of Rogatica itself on the banks of short river with a same name, the Žepa river, which flows into the Drina river nearby, in a valley between the mountains Javor and Devetak.During the Bosnian War (1992–95), Žepa became one of three Bosniak enclaves in eastern Bosnia surrounded by the Army of the Republika Srpska (VRS), along with Srebrenica, a short distance downstream, and Goražde farther upstream, after other towns such as Foča, Bratunac and Zvornik were taken by the VRS.In 1993, the town was declared a United Nations "safe area" and had a small Ukrainian Army unit of UNPROFOR peacekeepers stationed there.