The first historical document mentioning Bihać is the charter of the Hungarian king Bela IV on February 26, 1260. After two years, Bihac was proclaimed a royal free city and placed under the direct rule of the Hungarian throne, with all the rights and privileges that helped in many ways its development regardless of the political power of local lords.
In 1530, the Austrian committee secured troops to defend seven key strongholds in Croatia, one of which was Bihać and Ripač. The Turks occupied Bihać in 1592 after a ten-day siege and since then Bihać has been the site of the most important fortress in Bosnia until the 19th century. The Ottoman rule in Bihać de facto ended after the Berlin Congress.
During World War II, Bihac was included in Pavelić’s Independent State of Croatia after being captured by Axis powers troops.
The city was the capital of a short-lived territory, the Republic of Bihać, for two months in late 1942 and early 1943 until it was recaptured by German forces. Bihac was returned to Bosnian territory on March 28, 1945.