Khamenei remained closely associated with the exiled Khomeini during this time and immediately after the latter’s return to Iran in 1979 was appointed to the Revolutionary Council. After its dissolution he became deputy minister of defense and Khomeini’s personal representative on the Supreme Defense Council.