Stahel was transferred to Warsaw, where he was to defend the city against the advancing Red Army. However, the Soviet offensive was halted and instead on 1 August the Warsaw Uprising was started by the Polish Home Army. On the first day of the uprising Stahel was surrounded in his headquarters in the Saxon Palace, and he lost control of the situation. On 4 August the command over Nazi forces in Warsaw was given to Waffen-SS commander Erich von dem Bach and Stahel's pocket was subordinated to the new commander. Although by 7 August the troops of Oskar Dirlewanger managed to reach Stahel's positions in the city centre, he did not resume his command over the city's garrison. Instead, on 24 August he was dispatched to Bucharest, where similar urban fighting was anticipated by the German headquarters; his troops attempted to occupy Bucharest on 24 August, the capital of the country, but they were repulsed by troops loyal to King Michael I. Over this and the coming days Romania switched sides and the Red Army entered the city almost unopposed.