Although there is evidence of some settlement in the region dating back to the Bronze Age, the true history of Travnik begins during the first few centuries AD. Dating from this time there are numerous indications of Roman settlement in the region, including graves, forts, the remains of various other structures, early Christian basilicas, etc. etc. In the city itself, Roman coins and plaques have been found. Some writing found indicates the settlement is closely connected to the known Roman colony in modern day Zenica, 30 km (19 mi) away.
In the Middle Ages the Travnik area is known as the župa Lašva province of the medieval Bosnian kingdom. The area is first mentioned by Bela IV of Hungary in 1244. Travnik itself was one of a number of fortified towns in the region, with its fortress Kaštel becoming today's old town sector. The city itself is first mentioned by the Ottomans during their conquest of nearby Jajce.
After the Ottoman conquest of Bosnia, much of the local population converted to Islam. The city quickly grew into one of the more important settlements in the region, as authorities constructed mosques, marketplaces, and various infrastructure. During 1699 when Sarajevo was set afire by soldiers of Field-Marshal Prince Eugene of Savoy, Travnik became the capital of the Ottoman province of Bosnia and residence of the Bosnian viziers. The city became an important center of government in the whole Western frontier of the empire, and consulates were established by the governments of France and Austria-Hungary.
The period of Austrian occupation brought westernization and industry to Travnik, but also a reduction of importance. While cities such as Banja Luka, Sarajevo, Tuzla, and Zenicagrew rapidly, Travnik changed so little that during 1991 it had a mere 30,000 or so people, with 70,000 in the entire municipality.
During the Bosnian War, the town mostly escaped damage from conflict with Serbian forces, but the area experienced