Under the name Kozarac, the town was first time mentioned in written documents in
1334.
In 1360, Kozarac was already an independent town of Liberal Villa. During the same
period, Kozarac was the center of the Sana district. In 14th and 15th century power of Bosnian and later
Hungarian empires was weakening in this region.
In 1518, Kozarac was occupied by the Ottoman Empire.
The most of the economic and social development
in Kozarac had taken place during the control of the Ottoman Empire from 1518 to 1878.
During the period from 1687 to 1835 Kozarac
was an administrative and legislative center of the wider region.
The Ottoman control ended on September
6th, 1878 when Austro-Hungarian troops took over this region.
During the Austro-Hungarian Empire, Kozarac
slowly lost its previous importance in the area.