After Józef Piłsudski's May 1926 coup d'état, on 1 June 1926, Mościcki, once an associate of Piłsudski in the Polish Socialist Party, was elected president of Poland by the National Assembly on the Piłsudski's recommendation after Piłsudski had refused the office for himself. As president, Mościcki was subservient to Piłsudski and never openly showed dissent from any aspect of the Marshal's leadership. After Piłsudski's death in 1935, his followers divided into three main factions: those supporting Mościcki as Piłsudski's successor, those supporting General Edward Rydz-Śmigły, and those supporting Prime Minister Walery Sławek. With a view to eliminating Sławek from the game, Mościcki concluded a power-sharing agreement with Rydz-Śmigły, which saw Sławek marginalized as a serious political player by the end of the year. As a result of the agreement, Rydz-Śmigły would become the de facto leader of Poland until the outbreak of the war, and Mościcki remained influential by continuing in office as president. Mościcki was the leading moderate figure in the regime, which was referred to as the "colonels' government" because of the major presence of military officers in the Polish government. Mościcki opposed many of the nationalist excesses of the more right-wing Rydz-Śmigły, but their pact remained more or less intact. Mościcki remained president until September 1939, when he was interned in Romania following the German invasion of Poland, and he was forced by France to resign his office. He transferred the office to General Bolesław Wieniawa-Długoszowski, who held it for only one day before General Władysław Sikorski and the French government ousted him in favour of Władysław Raczkiewicz.
Later life
Mościcki was planning to leave for Switzerland after leaving office as President. From 1908 to 1920, he was a citizen of Switzerland; he was also an honorary citizen of the Fribourg commune. The Romanian authorities gave their provisional consent to his departure, but Germany opposed it. Mościcki was offered to USPresident Franklin Delano Roosevelt, who was determined to have Mościcki go to Switzerland. The intervention of the US government forced the Romanian authorities to agree. General Sikorski also ordered the Polish embassy in Bucharest to provide all assistance to Mościcki. The president stayed in Romania until December 1939. Mościcki came to Switzerland through Milan, where he met with Bolesław Wieniawa-Długoszowski. Initially, he lived in Friborg, where he was allowed to continue his scientific work. During this period, among others, he wrote down his memories, which were published by the New York magazineIndependence. Mościcki donated money to soldiers of the Polish Army in France, Warsaw residents in prisoner-of-war camps, concentration camps and labor camps. For five months, he taught at the University of Fribourg. Later, he was forced to take up paid work. In 1940, he moved to Geneva, where he worked in the Hydro-Nitro Chemical Laboratory. Mościcki's health deteriorated rapidly after 1943. He died on 2 October 1946, in Versoix, near Geneva. In 1984, his descendants requested that the remains of Mościcki and his wife be moved from Switzerland to Poland. The relevant Polish authorities agreed that a funeral was to be held in Warsaw and be completely private, without any state ceremonies. However, the authorities of the Canton of Geneva in Switzerland withdrew their agreement for political reasons after protests related to Solidarity from emigrants. In 1993, Mościcki's remains were transported, on behalf of incumbent President Lech Wałęsa, to Poland and deposited in the crypt of St. John's Archcathedral, Warsaw. Mościcki's symbolic grave is located in the Avenue of Merit at the Powązki Cemetery in Warsaw, where his second wife is buried next to him.