Tomáš Garrigue Masaryk was appointed professor of philosophy at the Czech Charles-Ferdinand University, the Czech-language part of Charles University, in 1882 and contested the Jewish blood libel during the 1899 Hilsner trial. He advocated restructuring the Austro-Hungarian Empire into a federal state until 1914. With the help of the Allied Powers, Masaryk gained independence for a Czechoslovak Republic as World War I ended in 1918. He co-founded Czechoslovakia together with Milan Rastislav Štefánik and Edvard Beneš and served as its first president, and so is called by some Czechs the "President Liberator". Masaryk was re-elected three times in 1920, 1927 and 1934.