In 1299, the castle was in English hands, when the constable, John Sampson, was besieged by the Scots. In 1304, Edward I of England besieged the Scots, deploying siege engines to force the garrison to surrender. In 1337, a siege by Sir Andrew Murray failed to retake the castle. Between 1571 and 1585, the castle was besieged three times by Scots factions during the reign of James VI. In 1651, Oliver Cromwell captured the castle during his invasion of Scotland. The final siege took place in 1746, when Charles Edward Stuart besieged the castle during the final Jacobite Rising.
After the defeat of William Wallace's Scots army at the Battle of Falkirk in 1298, it took Edward I six years to gain full control of Scotland. The last stronghold of resistance to English rule was Stirling Castle. Armed with twelve siege engines, the English laid siege to the castle in April 1304. For four months the castle was bombarded by lead balls (stripped from nearby church roofs), Greek fire, stone balls, and even some sort of gunpowder mixture. Impatient with lack of progress, Edward ordered his chief engineer, Master James of St. George, to begin work on a new, more massive engine called Warwolf (a trebuchet). The castle's garrison of 30, led by William Oliphant, eventually were allowed to surrender on 20 July after Edward had previously refused to accept surrender until the Warwolf had been tested.
Despite previous threats, Edward spared all the Scots in the garrison and executed only one Englishman who had previously given over the castle to the Scots. Sir William Oliphant was imprisoned in the Tower of London.