Complex sentence: In 1244, Alcalá de Guadaíra was captured by Ferdinand III of Castile who was responsible for the refurbishing of the castle and town fortifications, which were subsequently used as a royal prison with a military presence.
Split into simpler sentences: In 1244, Alcalá de Guadaíra was captured by Ferdinand III of Castile. The latter was responsible for the refurbishing of the castle and town fortifications, which were subsequently used as a royal prison with a military presence.