Historically, Ulster lay at the heart of the Gaelic world made up of Gaelic Ireland, Scotland and the Isle of Man. According to tradition, in ancient Ireland it was one of the fifths () ruled by a "rí ruirech", or "king of over-kings". It is named after the overkingdom of Ulaid, in the east of the province, which was in turn named after the Ulaid folk. The other overkingdoms in Ulster were Airgíalla and Ailech. After the Norman invasion of Ireland in the 12th century, eastern Ulster was conquered by the Anglo-Normans and became the Earldom of Ulster. By the late 14th century the Earldom had collapsed and the O'Neill dynasty had come to dominate most of Ulster, claiming the title King of Ulster. Ulster became the most thoroughly Gaelic and independent of Ireland's provinces. Its rulers resisted English encroachment but were defeated in the Nine Years' War (1594–1603). King James I then colonised Ulster with English-speaking Protestant settlers from Great Britain, in the Plantation of Ulster. This led to the founding of many of Ulster's towns. The inflow of Protestant settlers and migrants also led to bouts of sectarian violence with Catholics, notably during the 1641 rebellion and the Armagh disturbances. Along with the rest of Ireland, Ulster became part of the United Kingdom in 1801. In the early 20th century, moves towards Irish self-rule were opposed by many Ulster Protestants, sparking the Home Rule Crisis. This, and the subsequent Irish War of Independence, led to the partition of Ireland. Six Ulster counties became Northern Ireland, a self-governing territory within the United Kingdom, while the rest of Ireland became the Irish Free State, now the Republic of Ireland.