After the Irish War of Independence when the Irish Free State won independence in 1922, three deep water Treaty Ports at
- Cork Harbour
- Lough Swilly
were retained by the United Kingdom as sovereign bases]]. This was a condition of the Anglo-Irish Treaty of December 6 1921.
The ports remained under the control of the UK until ther Anglo-Irish Free Trade Agreement in 1938, when they were returned to Ireland. From an Irish point of view, the handover of the ports in the leadup to World War II was felt to be vital to consolidate Ireland's neutrality during "The Emergency".