It formally ceased to exist in 1922 with the ratification of the Anglo-Irish Treaty that ended the war, when 26 of the country's 32 counties became the Irish Free State and the other six remained within the United Kingdom as Northern Ireland. Sinn Féin refused to accept the treaty, said that the Irish Republic existed, even if it did not control any territory. This is why elected Sinn Féin TDs never took their seats in the parliaments of the Irish Free State or the United Kingdom