There is archaeological debate regarding precisely where and when Dublin originated, with a settlement established by the Gaels during or before the 7th century AD, and a second, Viking, settlement, following. As the small Kingdom of Dublin, the city grew, and it became Ireland's principal settlement following the Norman invasion. The city expanded rapidly from the 17th century and was briefly the second largest city in the British Empire after the Acts of Union in 1800. Following independence in 1922, Dublin became the capital of the Irish Free State, later renamed Ireland.