In October 1918, Mihály Károlyi established the Hungarian Democratic Republic, and Polanyi became Secretary to the Minister of Health. When the Communists seized power in March 1919, he returned to medicine. When the Hungarian Soviet Republic was overthrown, Polanyi emigrated to Karlsruhe in Germany, and was invited by Fritz Haber to join the Kaiser Wilhelm Institut für Faserstoffchemie (fiber chemistry) in Berlin. In 1923 he converted to Christianity, and in a Roman Catholic ceremony married Magda Elizabeth Kemeny. In 1926 he became the professorial head of department of the Institut für Physikalische Chemie und Elektrochemie (now the Fritz Haber Institute). In 1929, Magda gave birth to their son John, who was awarded a Nobel Prize in chemistry in 1986. Their other son, George Polanyi, who predeceased him, became a well-known economist.