Teba is situated in the west of the Antequera region. The River Guadalteba flows across its territory, creating the reservoir of the same name, part of the Guadalhorce-Guadalteba hydrological complex. The village itself is located between La Camorra, Camorrillo and San Cristobal hills and the castle.
Teba’s foremost monument is its castle, which affords an excellent view of the village and its territory.
Prehistoric remains have been found in La Paloma cave and at a location known as El Pilarejo.
The Romans called it Attegua, building its first fortress in what was known as Teba la Vieja, of which only remains exist today.
Julius Caesar makes detailed references to the surrender of Attegua in his books about the civil war with Pompey.
The Arabs were the first to build an urban settlement on the present-day site of the village, calling it Ostebba; in order to fortify the area, they built a castle which is now known as the Star Castle (Castillo de la Estrella) whose walls are still standing today.
Alfonso XI of Castile captured Teba from the Moslems in 1330. In the same campaign, Ardales, Cañete la Real, Priego and Ortejicar were also taken.
Chronicles tell us that the walls of Teba castle were the scene of the demise of Black Douglas, a commander in the Scots army who, while on his way to the crusades carrying the heart of the King of Scotland, Robert The Bruce, allied his troops with the Christian forces to engage the Moslem infidels who held the castle.