Throughout the Middle Ages, Newcastle was England's northern fortress. Incorporated first by Henry II, the city had a new charter granted by Elizabeth in 1589. A 25-foot (7.6 m) high stone wall was built around the town in the 13th century, to defend it from invaders during the Border war against Scotland. The Scots king William the Lion was imprisoned in Newcastle in 1174, and Edward I brought the Stone of Scone and William Wallace south through the town. Newcastle was successfully defended against the Scots three times during the 14th century, and was created a county corporate with its own sheriff by Henry IV in 1400.