The Kingdom of Scotland emerged as an independent sovereign state in the Early Middle Ages and continued to exist until 1707. By inheritance in 1603, James VI, King of Scots, became King of England and King of Ireland, thus forming a personal union of the three kingdoms.