The final push for independence of Poland took place on the ground in October–November 1918. Near the end of the war, Austro-Hungarian and German units were being disarmed, and the Austrian army's collapse freed Cieszyn and Kraków at the end of October. Lviv was then contested in the Polish–Ukrainian War of 1918–1919. Ignacy Daszyński headed the first short-lived independent Polish government in Lublin from 7 November, the leftist Provisional People's Government of the Republic of Poland, proclaimed as a democracy. Germany, now defeated, was forced by the Allies to stand down its large military forces in Poland. Overtaken by the German Revolution of 1918–1919 at home, the Germans released Piłsudski from prison. He arrived in Warsaw on 10 November and was granted extensive authority by the Regency Council; Piłsudski's authority was also recognized by the Lublin government. On 22 November, he became the temporary head of state. Piłsudski was held by many in high regard, but was resented by the right-wing National Democrats. The emerging Polish state was internally divided, heavily war-damaged and economically dysfunctional.