Rathfarnham Castle () is a 16th-century fortified house in Rathfarnham, South Dublin, Ireland. The earlier Irish castle was occupied by the Harold family, who held it as tenants of the le Bret family. It was replaced by the present building built on lands confiscated from the Eustace family of Baltinglass, to whom it had passed, because of their involvement in the Second Desmond Rebellion. The Geraldines defended the Pale from the Irish clans in the nearby Wicklow Mountains. It is believed the present castle was built around 1583 for Archbishop Adam Loftus. Originally a semi-fortified and battlemented structure it underwent extensive alterations in the 18th century. The castle consisted of a square building four stories high with a projecting tower at each corner, the walls of which were an average of thick. On the ground level are two vaulted apartments divided by a wall nearly thick which rises to the full height of the castle. On a level with the entrance hall are the 18th-century reception rooms and above this floor, the former ballroom, later converted into a chapel. Rathfarnham was described as a "waste village" when Loftus bought it. His new castle was not long built when in 1600 it had to withstand an attack by the Wicklow clans during the Nine Years' War. English Civil war Archbishop Loftus left the castle to his son, Dudley and it then passed to his son Adam in 1616. During Adam's ownership, the castle came under siege in the 1641 rebellion. It was able to hold out against the Confederate army when the surrounding country was overrun. Adam Loftus opposed the treaty of cessation in order to stop the fighting between the Irish Confederates and the English Royalists. Consequently, he was imprisoned in Dublin Castle. 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 a council there during his campaign in Ireland