In written documents Maglaj is first mentioned in 1399 within the charter of King Stjepan Ostoje but officially by name “Sub castro nostro Maglay” in the year 1408 in the charter of Austro-Hungarian King Sigismund during the era of Bosnian independence, which he wrote during his return from the battlefield. In Turkish documents Maglaj is mentioned in 1485, whilst the first diplomatic document is a contract between Hungary and Turkey, where Maglaj is consigned to Turkey in August 20 1503. According to new findings the city, respectively the fortress was firstly named "Stražba" but as the land is often covered it was named Maglaj which means fog in Bosnian.