The fortress was built in 1538 by the Spaniards when Admiral Andrea Doria's fleets arrived in Herceg Novi in June of that year, and was originally named after the Roman emperor Charles V. The name it bears today is due to the local population. Only a year after that, the Turks reconquered the city led by their Admiral Hajredin Barbaros, who led a huge fleet into a very difficult and exhausting battle. The Turks rebuilt the fortress between 1539-1548, on the same site where it was originally built by the Spaniards who had previously destroyed a small Turkish settlement there. The Turks left a written will, in Turkish (they used Arabic until 1928, and then switched to Latin) about the construction of this fortress, which was placed above the entrance and on which it was written:"This fortress, by order of the sultan, was built by Suleiman, the son of the great Emir Selman Khan, a powerful knight, whose brother Sinan-beg, who was the sultan's grand vizier. May he live long, and prosper in happiness and wealth under the protection and help of a merciful God. And the poets who are brought here by the road, let them look at me and click enchantingly: oh, you are beautiful, beautiful building ".
Due to the strategic advantage of Bajer Hill, the Španjola Fortress is located on the northeast side of the city at an altitude of 170m and dominates the entrance to the Bay of Kotor, and provides a perfect view of the surrounding area. The fortress is fortified with huge walls and 4 circular bastions on each corner. Although it looks impressive on the outside, there is very little left on the inside. The main entrance is on the east side and secured with an outer wall while the south side faces the sea, has undergone several adaptations for new fortification standards (the sign of the Venetians) while on the west side remains Turkish architecture and parts of the mosque. Spain always had the character of a defensive fortress until the beginning of the 20th century. It was used as a prison in World War II. At some point, each ruler made some modifications to the fortress. The Venetians, for example, built a large semicircular wall between the two bastions, thus creating an inner courtyard. They also set up another staircase next to the fortress walls, thus moving the entrance and turning the Turkish mosque into a barracks. The Austro-Hungarians also made a couple of changes according to their needs, which eventually turned out to be new structures next to the fortress itself. The fortress is connected by underground passages with two other fortresses in the city, Kanli Kula and Forte Mare. Today, these passages are more or less destroyed, but in the past, when fully functional, they provided a significant strategic advantage because the city's defense forces, even in the event of the fall of Kanli Kula and Forte Mare, could simply move to Španjola and continue. defense from there.