He legalized political parties, set new elections, and oversaw the release of a number of political prisoners. The situation in homeland continued to deteriorate, however, as strikes and demonstrations increased, and in November 1978 Sharif-Emami resigned. As the Iranian Revolution flared and the country fell under the control of Ayatollah Ruhollah Khomeini, Sharif-Emami fled to the United States, where he became president of the Pahlavi Foundation, an educational trust for Iranian students.