He was President of Poland twice: first in December 1922, as Acting President of the Republic of Poland for one week, after the assassination of president Gabriel Narutowicz, and again in May 1926, following Józef Piłsudski's May Coup and the resignation of president Stanisław Wojciechowski. His second term lasted half of a month. On both occasions, he oversaw special election and appointed new governments. In December 1939 he was arrested by Nazi Germany and executed in Palmiry during the German AB-Aktion operation in Poland.