The Scottish Wars of Independence began in 1286 with the death of King Alexander III and ended in 1328 with the signing of the Treaty of Edinburgh. The crisis was caused because Alexander III died without an obvious heir. King Edward I intervened and installed John Balliol as King, but his reign was difficult, troubled, and ended by an English invasion.
Scottish resistance continued, most notably under William Wallace, until Robert Bruce rose up and had himself crowned as King of Scots. After the Battle of Bannockburn in 1314, the fight for Scottish independence was won, and was formalised by a treaty between Scotland and England in 1328.