The Polish government-in-exile was formed in the aftermath of the Invasion of Poland in September 1939, and the subsequent occupation of Poland by Nazi Germany and the Soviet Union, which brought an end to the Second Polish Republic.
Despite the occupation of Poland by hostile powers, the government-in-exile continued to exert influence in Poland through the Polish Underground State and its military arm, the Home Army (Armia Krajowa) resistance. Outside of Poland, under the authority of the government-in-exile, Polish military units that had escaped the German occupation fought as part of Allied forces in Europe, Africa, and the Middle East.
The government-in-exile was based in France during 1939 and 1940; and in 1940, following the fall of France, the government moved to London. It remained in England until its dissolution with the fall of communism in 1990.