Standing facing the ocean, the castle of Guzmán the Good is one of the oldest in Andalusia. It was commissioned by Abd er-Rahman III, the first Arab emir to take the title of Caliph, who was keen to control the Strait of Gibraltar. Its construction began in 960, but the castle's present appearance is the result of the many extensions it underwent afterwards. The Church of Santa María (14C) stands inside.