During the Napoleonic Wars (1803–1815), Prussia was from some time a British ally and suffered for it; some of the other German states had supported France. Germany and Britain fought against each other in World War I and World War II. After British occupation of northern West Germany from 1945 to 1950, they became close allies in NATO, which continued after reunification. Both nations are also founding members of several of the European political communities. With Britain's entry into the EEC in 1973, both countries have been primary members of what is now the European Union. In a political referendum held in 2016, the UK voted to withdraw from the European Union and left the bloc on 31 January 2020 after 47 years of membership.