 In December 1921 , the Anglo @-@ Irish Treaty was concluded between the British Government and representatives of the Second Dáil . It gave Ireland complete independence in its home affairs and practical independence for foreign policy , but an opt @-@ out clause allowed Northern Ireland to remain within the United Kingdom , which it immediately exercised as expected . Additionally , an oath of allegiance to the King was to be taken . <unk> over these provisions led to a split in the nationalist movement and a subsequent Irish Civil War between the new government of the Irish Free State and those opposed to the treaty , led by <unk> de Valera . The civil war officially ended in May 1923 when de Valera issued a cease @-@ fire order . 
