During the subsequent Irish Confederate Wars (1641–53), the castle changed hands several times. From 1641 to 1647, it was garrisoned by English Royalist troops. In 1647, Ormonde, commander of the Royalists in Ireland, surrendered Dublin to the English Parliament and Parliamentary troops were stationed at the castle until 1649 when a few days before the Battle of Rathmines, the castle was stormed and taken without a fight by the Royalists as part of the Siege of Dublin. However, the Roundheads re-occupied it after their victory at the Battle of Rathmines. It has also been reported that Oliver Cromwell held council there during his campaign in Ireland before going south to besiege Wexford. Adam Loftus, who recovered his castle and lands under Cromwell, sided with the Parliamentarians and was killed at the Siege of Limerick in 1651.