In 1216 Dover Castle was besieged by Prince Louis of France. King John left Hubert de Burgh in charge at Dover and even though the French managed to breach the defences by undermining the north gate, de Burgh's forces beat back the attack and Prince Louis called a truce. The truce was short lived as John died soon after and Louis again attempted to take the castle. Louis was eventually defeated by Hubert de Burgh.
Hubert de Burgh with King Henry III's backing rebuilt the damaged castle removing areas of weakness that had been exposed during the siege. This included the construction of an inner wall around the keep.
Of interest now are the newly opened 'Secret War Tunnels' that were dug into the white cliffs of Dover and used during World War II as a hospital and for strategic planning. Recently English Heritage has decorated the inside of the keep to show how it may have looked in medieval times.