Piłsudski agreed to serve in the Regency Kingdom of Poland, created by the Central Powers, and acted as minister of war in the newly formed Polish Regency government; as such, he was responsible for the Polnische Wehrmacht. After the Russian Revolution in early 1917, and in view of the worsening situation of the Central Powers, Piłsudski took an increasingly uncompromising stance, insisting that his men no longer be treated as "German colonial troops" and but be used to fight only Russia. Anticipating the Central Powers' defeat in the war, he did not wish to be allied with the losing side. In the aftermath of a July 1917 "Oath Crisis" when Piłsudski forbade Polish soldiers to swear a loyalty oath to the Central Powers, he was arrested and imprisoned at Magdeburg; the Polish units were disbanded and the men were incorporated into the Austro-Hungarian Army while the Polish Military Organization began attacking German targets. Piłsudski's arrest greatly enhanced his reputation among Poles, many of whom began to see him as the most determined Polish leader, who was willing to take on all the partitioning powers.