At first, the military coup seemed to fail, and Shah Mohammed Reza Pahlavi fled the country.[12][13] After widespread rioting and with help from the CIA and British intelligence services, Mossadeq was defeated and the Shah returned to power, ensuring support for Western (chiefly British) oil interests and ending the perceived threat of communist expansion. General Fazlollah Zahedi, who led the military coup, became prime minister.