Until 1922 secret societies, popular risings and guerrilla warfare came in sporadic outbreaks in attempts to end the 1801 union of Ireland and Great Britain. Between 1919 and 1922 the War of Independence brought the negotiation of the Anglo-Irish Treaty and the majority of Ireland seceded from the United Kingdom to form an independent state, which immediately fell into a civil war between opposing republican factions. The northern portion of the country would form Northern Ireland becoming an autonomous part of the United Kingdom.