Both Ireland and the United Kingdom joined the European Union (then the European Communities) in 1973. However, the three Crown dependencies remain outside of the EU. In June 2016, the United Kingdom held a referendum in which the majority voted to leave the European Union, but the majority of voters in Northern Ireland voted for remaining in the EU. Brexit became effective on 31 January 2020, with a deal being reached on 24 December 2020, keeping Northern Ireland in the EEC and keeping a free border between the ROI and NI.