Late 15th c., Spanish. A fascinating blend of Moorish and Gothic architecture.
I once heard an architect talk about the kind of monstrosity someone without a budget would build. There's something about this castle that feels like that to me. I suppose they was a lot of gold coming into Spain at that time.