Unlike most of Great Britain, most of Scotland was not part of the Roman Empire and did not become part of Anglo-Saxon England. In the Middle Ages and the Early Modern Period, Scotland was an independent kingdom. The Kingdom of Scotland started in the 9th century AD. The kingdom started to share a king with the Kingdom of England and the Kingdom of Ireland in 1603. In that year, the king of Scotland inherited the two kingdoms of Elizabeth I, and James VI of Scotlandbecame the first king of the whole British Isles. In 1707, the parliament of Scotland joined with the parliament of England to become the Parliament of Great Britain. This formed the United Kingdom of Great Britain. This kingdom joined with the Kingdom of Ireland in 1801 to make the modern United Kingdom.