Due in part to his strong support of the Communists, he replaced fellow Smallholder Lajos Dinnyés as prime minister in December 1948, helping preside over the final stage of the Communists' complete takeover of the country. In short order, Dobi pushed out those elements of his party who were unwilling to do the Communists' bidding, leaving the party in the hands of fellow travelers like himself. This process was repeated with the other non-Communist parties as well.