He trained as a cleric before graduating in law from Tehran University (1972). Active in the Islamic opposition to the government, he fled Iran in 1977 and joined Ayatollah Khomeini, then exiled in France, in 1978. Following the Islamic Revolution Rouhani held a number of posts, including secretary of the Supreme National Security Council (1989–2005) and leader of Iran’s delegation in negotiations about its nuclear programme (2003–05). He resigned his offices on the election of the hard-line Mahmoud Ahmadinejad as President (2005). In 2013 Rouhani stood as a moderate candidate in the presidential election and achieved a landslide victory. As President he quickly softened his predecessor’s uncompromising diplomatic stance, reaching an international agreement on Iran’s nuclear programme in 2015, that resulted in the lifting of US and EU sanctions. Domestically, he has faced opposition from hardliners for allowing greater personal freedoms.