Yes, Longshanks... a fine name. If it weren't too late, I'm sure I'd name my firstborn Longshanks. Actually, his father, Henry III of England, named him Edward, when he was born in June of 1239. He later became known as Longshanks due to his height, and Hammer of the Scots for his treatment of the Scots.
Alexander III was the king of Scotland from July 1249, at the age of 8, until his death in March of 1286. Because he had married Margaret of England, Henry III's daughter, Henry had already demanded homage from the Scots, which Alexander refused. Scotland had long been a kingdom in its own right.
By March of 1286, Alexander had been widowed, his two sons had died, and his daughter had gone to marry the King Erik II of Norway, given birth to a daughter, and died. His only heir, therefore, was his granddaughter, Margaret. So, on a dark and stormy night in March of 1286, Alexander, having remarried, was determined to reach his new queen in Fife. Despite warnings from his advisors, he went ahead. In the dark, his horse fell down a steep embankment, and Alexander was found dead, at the age of 44, from a broken neck.
When his unborn child by his new queen was stillborn, his granddaughter, the Maid of Norway, was sent for, as the new Queen of Scotland. She died on the way to Scotland. Some sources say she was as old as 7, some as young as 4.
It is at this point that Edward I-- Edward Plantaganet, Longshanks, or Hammer of the Scots, as he is variously known-- comes into the picture. Without a clear heir, there were a dozen claimants to the throne of Scotland, six of whom had any really serious claims, and two real contenders: John Baliol and Robert Bruce, father of the better known Robert the Bruce.
The Scottish lords asked Edward I of England to choose, in order to avoid contention. He agreed on the condition that he become Scotland's overlord, basing his claim on Alexander's homage to his father some years ago, although that homage was only for certain lands Alexander held within England. The Scots agreed only that Scotland would be Edward's until a rightful heir was chosen.
Longshanks chose Baliol, believing he had chosen a weak man whom he could control, and then continued to assert his authority over Scotland. When Baliol refused to send troops for Edward's war in France, Longshanks stormed north to subdue the Scots in 1296.
Thus began the years of war between England and Scotland, continuing through the days of William Wallace of Braveheart fame, and past the death of Longshanks himself in 1307.
Under Longshanks' son, Edward II, the Scots gradually regained all Edward I had taken, until Stirling was one of the few Scottish castles remaining in English hands, and it was for Stirling that the battle of Bannockburn was fought on Midsummer's Day in 1314.