It was built by the Archbishop of Seville and Don Alonso de Fonseca, lord of Coca and Alaejos. During the Revolt of the Comuneros, (when Castile rebelled against the king), it remained faithful to Charles V.
It is a mixture of western and Moorish military architecture, as can be seen from its decoration. It has a square ground plan, a moat and two walled enclosures, which gives it the air of impregnability for which it has been known over the centuries. The keep is located in the second area. It is made of brick and its walls are profusely decorated. The interior is very luxurious and lavish, and conserves its Mudejar decoration. Due to its great splendour, it was used more as a palace than as a fortress. It is one of the crowning works of the military Mudejar style.