After the end of the Great War, Irish republicans won the Irish general election of 1918 and declared Irish independence. This led to the Irish War of Independence (1919–1922), fought between the Irish Republican Army (IRA) and British forces. Ex-servicemen fought for both sides. During the War of Independence, the British government partitioned Ireland. This phase of conflict ended with the Anglo-Irish Treaty which split Sinn Féin and the IRA, leading to the Irish Civil War (1922–1923) between pro-treaty and anti-treaty forces. The pro-treaty forces were victorious, with most of the island becoming the Irish Free State.