After World War II, with Soviet support, the Communist Party took power in Hungary. Kádár rose through the Party ranks, serving as Interior Minister from 1948 to 1950. In 1951 he was imprisoned by the government of Mátyás Rákosi but was released in 1954 by reformist Prime Minister Imre Nagy. On 25 October 1956, during the Hungarian Revolution, Kádár replaced Ernő Gerő as General Secretary of the Party, taking part in Nagy's revolutionary government. However, a week later he would break with Nagy over his decision to withdraw from the Warsaw Pact. After the Soviet intervention, Kádár was selected to lead the country. He presided through repression, ordering the execution of Nagy and his close associates and the imprisonment of many others. He would gradually moderate, releasing the remaining prisoners of this period in 1963. His leadership was characterized by unrelenting Realpolitik: for a long time, he successfully manoeuvred between Moscow's wishes, local interests and the expectations of the Western world. In an interview with a Western journalist, he called himself a "toiler for compromise".
