The history of the San Marcos Castle (or "el Castillito", as it is affectionately called in El Puerto) begins in the 10th century, when it was built. In that century, Spain was invaded by the Muslims. Remember that the Muslims were here for 8 centuries. Originally, the castle was a mosque, the most important of Al-Qanatir, the Muslim village that was right where El Puerto de Santa María is now. From that time we still have the sacred wall of the quibla and the mihrab, thanks to King Alfonso X El Sabio (the wise). Alfonso X was the leader of the Christian Reconquest in the 13th century, but he was a very tolerant person. So when he came to our city, he decided not to destroy the mosque, but to build a wall in front of the quibla, so that it would be hidden. In the 20th century, the wall collapsed and the quibla appeared, very well preserved. Thanks to Alfonso X, today we can contemplate it.
During the Reconquest, Alfonso X chose the San Marcos Castle as a strategic defensive point in this area. In addition to covering the quibla, Alfonso X built a Christian altar next to it, so the mosque became a Catholic church. For several years, our castle was called church-fortress of Santa Maria. Legend has it, that the Virgin appeared to Alfonso X in the Castle and helped him in the battles.
The castle has had many other functions since then. For example, for many years it was a prison. Even the well in the yard was used as a prison. Many years later, during the Spanish Civil War, many people were shot in this place. Today, we can still see on their walls the marks left by the bullets.
San Marcos Castle was declared of Cultural Interest in 1920, in the category of National Monument. Inside we can also find the Gothic sculpture of Santa Maria de España, a Virgin that is very connected to the history of El Puerto de Santa Maria.