Complex sentence: By the 19th century the castle had fallen into ruin, but was occupied and somewhat modified by the Irish Army during the Emergency (1939-1945).
Split into simpler sentences: By the 19th century the castle had fallen into ruin. The castle was occupied and somewhat modified by the Irish Army during the Emergency (1939-1945).