|This article needs additional citations for verification. (January 2012)|
Initially supporting the Central Powers against Imperial Russia, Piłsudski wanted to defeat one of the partitioning powers with the hands of the two remaining states, the Austria-Hungary and Germany. However, after the Russian defeat in the Great War it became clear that the Central Powers were in no position to guarantee the independence of Poland. Despite the Act of November 5th of 1916 and the creation of Kingdom of Poland, it was clear that the newly created state would not become anything more than a puppet buffer state of Germany, a part of its Mitteleuropa plan.
Piłsudski then decided to switch sides and gain the support of the Entente for the cause of Polish independence. A good pretext appeared in July 1917, when the Central Powers demanded that the soldiers of the Polish Legions swear allegiance and obedience to the Emperor Wilhelm II of Germany. Following the inspiration of Józef Piłsudski, the majority of the soldiers of the 1st and 3rd Brigades of the Legions declined to make the oath. The citizens of Austria-Hungary (roughly 3,000) were then forcibly drafted into the Austro-Hungarian Army or the Polnische Wehrmacht, demoted to privates and sent to the Italian Front, while people born in other parts of occupied Poland were interned in prisoner of war camps in Szczypiorno and Beniaminów. Approximately 7,500 soldiers were joined with the rump Polish Auxiliary Corps. Piłsudski himself and his Chief of Staff Kazimierz Sosnkowski were arrested on 22 July 1917 and interned in a German fortress in Magdeburg.