During the reign of King Henry II (1154–89), the motte-and-bailey was replaced with a stone keep castle. This new phase took the form of a shell keep with all the buildings constructed against the curtain wall. During the Barons' Rebellion of 1173–74, the Earl of Warwick remained loyal to King Henry II, and the castle was used to store provisions. The castle and the lands associated with the earldom passed down to the Beaumont family until 1242. When Thomas de Beaumont, 6th Earl of Warwick died, the castle and lands passed to his sister, Margaret de Beaumont, 7th Countess of Warwick in her own right. Her first husband, John Marshal, died soon after, and while she looked for a suitable husband, the castle was in the ownership of King Henry III of England. When she married John du Plessis in December 1242, the castle was returned to her. During the Second Barons' War of 1264–67, William Maudit, 8th Earl of Warwick, was a supporter of King Henry III. The castle was taken in a surprise attack by the forces of Simon de Montfort, 6th Earl of Leicester, from Kenilworth Castle in 1264. According to 15th-century chronicler John Rous, the walls along the northeastern side of Warwick Castle were slighted, so "that it should be no strength to the king". Maudit and his countess were taken to Kenilworth Castle and were held there until a ransom was paid. After the death of William Maudit in 1267, the title and castle passed to his nephew, William de Beauchamp, 9th Earl of Warwick. Following William's death, Warwick Castle passed through seven generations of the Beauchamp family, who, over the next 180 years, were responsible for most of the additions made to the castle. In 1312, Piers Gaveston, 1st Earl of Cornwall, was captured by Guy de Beauchamp, 10th Earl of Warwick, and imprisoned in Warwick Castle, until his execution on 9 June 1312. A group of magnates led by the Earl of Warwick and Thomas, 2nd Earl of Lancaster, accused Gaveston of stealing the royal treasure.