He was in the Iranian Ministry of Intelligence and National Security (or VEVAK) as deputy to Ali Fallahian and in April 2007 was appointed by President Mahmoud Ahmadinejad as the security advisor to the president.