From November 1918, when Poland regained its independence, until 1922, Piłsudski was Poland's Chief of State. In 1919–21 he commanded Polish forces in six border wars that re-defined the country's borders. On the verge of defeat in the Polish–Soviet War in August 1920, his forces threw back the invading Soviet Russians at the Battle of Warsaw. In 1923, with the government dominated by his opponents, in particular the National Democrats, Piłsudski retired from active politics. Three years later he returned to power in the May 1926 "coup d'état" and became the strongman of the Sanacja regime. From then on until his death in 1935, he concerned himself primarily with military and foreign affairs. It was during this period that he developed a cult of personality that has survived into the 21st century.