sentence1: In 1932 he joined the then illegal Communist party and held high government and party posts from 1942, becoming home secretary in 1948, when the Communist party took control in Hungary.
sentence2: Communist control in Hungary ended in 1948.