<P> The Kingdom of Scotland was united under the descendants of Kenneth MacAlpin, first king of a united Scotland . His descendants, known to modern historians as the House of Alpin, fought among each other during frequent disputed successions . The last Alpin king, Malcolm II, died without issue in the early 11th century and the kingdom passed through his daughter's son, Duncan I, who started a new line of kings known to modern historians as the House of Dunkeld or Canmore . The last Dunkeld king, Alexander III, died in 1286 leaving only a single infant granddaughter as heir; four years later, Margaret, Maid of Norway herself died in a tragic shipwreck en route to Scotland . </P> <P> England, under Edward I, would take advantage of the questioned succession in Scotland to launch a series of conquests into Scotland . The resulting Wars of Scottish Independence were fought in the late 13th and early 14th centuries as Scotland passed back and forth between the House of Balliol and the House of Bruce . Scotland's ultimate victory in the Wars of Independence under David II confirmed Scotland as a fully independent and sovereign kingdom . When David II died without issue, his nephew Robert II established the House of Stewart (the spelling would be changed to Stuart in the 16th century), which would rule Scotland uncontested for the next three centuries . </P> <P> James VI, Stuart king of Scotland, also inherited the throne of England in 1603, and the Stuart kings and queens ruled both independent kingdoms until the Act of Union in 1707 merged the two kingdoms into a new state, the Kingdom of Great Britain . </P> <P> Ruling until 1714, Queen Anne was the last Stuart monarch . Since 1714, the succession of the British monarchs of the houses of Hanover and Saxe - Coburg and Gotha (Windsor) has been due to their descent from James VI and I of the House of Stuart . </P>

When did scotland become a part of great britain