The confrontation of the powers that owned Polish territories during World War I made the renewal of Polish statehood an urgent issue. Russian authorities promised to grant autonomy to united Poland after the end of the war. After the February Revolution of 1917, the Russian Provisional Government announced its intention to establish an independent Poland after the victory in the war and permitted the formation of Polish units within the Russian army. In turn, in November 1916, the governments of Germany and Austria-Hungary established the Polish Kingdom, which depended on them, on the occupied territory of the Russian Empire. Since September 1917, it was ruled by the Regency Council.
On October 7, 1918, the Regency Council declared the independence of the Kingdom of Poland, transferred supreme military and supreme civil power to Józef Piłsudski (on November 11 and 14 respectively), and dissolved itself. At the same time, Polish territories of disintegrated Austria-Hungary with the center in Krakow, which had declared independence, joined the Polish state. On February 20 the Legislative Sejm elected in January 1919 adopted a provisional Small (or Minor) Constitution, which established the powers of supreme bodies of state power and confirmed the position of Piłsudski as the Head of State. Poland became a parliamentary republic with a strong legislative branch.
Poznan uprising of the Poles in the German Province of Posen (Poznan), which began at the end of December 1918, resulted in its inclusion in the Polish Republic under the terms of the Versailles Peace Treaty on June 28, 1919. The treaty also transferred part of Pomerania to Poland, which gained access to the Baltic Sea as a result. Polish-Ukrainian War of 1918–1919 ended with the defeat of the West Ukrainian People’s Republic and the annexation of Galicia to Poland. In February 1919, the Soviet-Polish war began, which resulted in the annexation of Western Byelorussia and Western Ukraine to the Republic of Poland. In October 1920, Polish troops captured a part of the Republic of Lithuania with the city of Vilno (Vilnius) and established there a state of Central Lithuania, which in February 1922 was also annexed to Poland. The uprising of Poles in 1919–1921 and the referendum resulted in the annexation of part of German Upper Silesia to the republic, while the conflict with Czechoslovakia caused the loss of part of the Cieszyn region (1920).
On March 17, 1921, Legislative Sejm adopted a constitution, which approved the republican system in Poland. It proclaimed and enshrined the basic democratic rights of citizens, vested legislative power in the Sejm, and entrusted it with the responsibilities of forming a government and controlling it. The executive power in the country was exercised by the president elected by the Sejm and the Senate.