Beginning in the spring of 1944, the Polish underground was preparing for the Operation Tempest, which was designed to cause a large scale uprising behind the German lines to prevent the Soviet takeover of the territory by establishing a local Polish administration before the Soviet's arrival, as a sign to the entire world that the Polish government in exile commanded significant Polish forces. Operation Tempest would also support the Soviet Eastern Front offensive. In June Krzyżanowski and his subordinates prepared the Operation Ostra Brama. On 2 July 1944, he gave orders to begin the operation on the 7 July, although because of the Soviet quick advance the operation was put into effect one day early (on 6 July). in the effect of the German-AK relationship in the area, only a third of the available AK force took part in the operation against the Nazis. Ultimately, the Polish forces had to cooperate with the Soviets to secure Wilno. After the Poles and Soviets defeated the Germans on 17 July 1944, Polish officers, including Krzyżanowski, who had been invited to a debriefing with the Soviets, were arrested and imprisoned.