Following the Republican coup against the Hashemite monarchy, Barzani was invited to return to Iraq by the new prime minister Abdul Karim Qasim. In October 1958, Barzani and his followers returned from the Soviet Union, and Barzani quickly established warm ties with Qasim. Qasim hoped to use Barzani as a potential ally in the power struggles in Iraq, as Qasim faced considerable resistance from more nationalist minded Arab officers and intellectuals in the country. Mustafa Barzani faced similar challenges within the KDP, with divisions rising over land reform, political position, and alliances with other parties in Iraq such as the Iraqi Communist Party. Barzani quickly asserted control over the KDP, ousting the General-Secretary Ibrahim Ahmad and replacing him with the pro-Communist Hamza Abdullah in January 1959 and cementing ties with the ICP.