In the Bishop's Wars castles that held out for the king against the Covenanters, including Caerlaverock and Threave in 1640, were slighted, with their roofs removed and walls breached to make them uninhabitable. Tantallon was used as a base for Scottish attacks on Oliver Cromwell's advancing army in 1651. As a result, it was pounded into submission by the New Model Army's siege train, losing its end towers and ceasing to be a residence from that point. The sequence of Jacobite risings from 1689 threatened the Crown in Scotland, culminating in the rebellion in 1745. Stirling was able to withstand the Jacobite attack in 1745 and the siege of Blair Castle, at the end of the rebellion in 1746, was the final castle siege to occur in the British Isles. In the aftermath of the conflict Corgaff and many others castles were used as barracks for the forces sent to garrison the Highlands. Kildrummy, Huntly and Doune were destroyed as a result of their part in the rebellion.