The town of Jajce was first built in the 14th century and at that time served as the capital of the independent Kingdom of Bosnia. The first mention of the name Jajce in written sources dates back to 1396, but by then the fortress already existed. It was the residence of Hrvoje Vukčić Hrvatinić, and later of the Bosnian kings.