Who was in charge after the Shah left Iran?

After Shah Mohammed Reza Pahlavi left on January 16, 1979, control of the government fell to his Prime Minister Shahpour Bakhtiar, who continued to rule until February 11, 1979. Iran was then ruled by an interim government headed by Mehdi Bazargan as Prime Minister until his resignation on November 6, 1979 in protest of the attack on the US Embassy (which he believed were brutish actions unbefitting of Iranians). With Bazargan's resignation, the Islamists led by Ruhollah Khomeini swept into power and began to rule the country.