The first underground groups in German-occupied Poland began to be established as early as in the autumn of 1939. The Home Army (Armia Krajowa, AK), an underground army subordinate to the Polish government in exile and the Commander-in-Chief, took its final shape in February 1942. Its Commanders-in-Chief in chronological order were: Stefan Rowecki ‘Grot’ (arrested in June 1943), Tadeusz Komorowski ‘Bór’ (in captivity since October 1944), and Leopold Okulicki ‘Niedźwiadek’ (appointed in January 1945). The Home Army dealt with military training, obtainment of weapons, communications, information, propaganda, etc. The AK unit for sabotage operations, special operations, and carrying out death sentences on representatives of the German repression apparatus was the Directorate of Diversion (Kierownictwo Dywersji, Kedyw), established in January 1943. The Home Army was one of the largest military organizations in occupied Europe, with the number of its members reaching approx. 390,000 in the spring of 1944.
The AK’s political situation became more complicated when in January 1944 the Red Army crossed the border of the Second Republic of Poland in pursuit of the retreating German troops. The Polish government in exile had not maintained official diplomatic relations with the USSR since the spring of 1943, when it learned the truth about the Katyn massacre. Consequently, the Home Army had acted against the Germans without consulting the Red Army. Within the framework of Operation Tempest the Home Army had organized local uprisings in the rear of the German army since January 1944. Their objective was for the AK to act as host toward the Red Army on the liberated terrains. The Soviets used the AK’s support, but when the fighting was over they disarmed the Polish detachments and arrested their commanders, while the AK soldiers were either deported to camps in the USSR or incorporated into the Polish People’s Army (Ludowe Wojsko Polskie), established by Stalin.
Initially, the capital of Poland was not included in the plans for Operation Tempest, but when the Red Army was nearing Warsaw the Home Army command decided to stage an uprising there. The Warsaw Uprising broke out on 1 August 1944 and ended 63 days later in a fiasco.
Until December 1944 Polish territory east off the River Vistula was occupied by the Red Army. On 31 December Stalin formed the puppet Provisional Government of the Republic of Poland. Faced with the new Soviet occupation the Polish government in London deemed it necessary to reorganize the underground structures, as actions against the Soviet occupier and the communist authorities, which he established, required a different strategy and different methods. The Home Army was officially dissolved on 19 January 1945. One of the reasons for that was to prohibit the Soviets from accusing the AK of hostile activity and persecuting its soldiers as members of a military organization deemed illegal by the Soviets and the communist authorities subordinate to them. Most AK soldiers were gradually demobilized. As the same time began the formation of the cadre underground structures, which were then transformed into an organization called Freedom and Independence (Wolność i Niezawisłość).