Iran's conservative-dominated parliament on Wednesday voted to sack the science minister for wanting to recruit people accused of involvement in the 2009 protest movement.
Reza Faraji Dana, whose responsibilities included Iran's universities, was sacked after a censure motion went against him.
The motion was backed by 145 of the 270 lawmakers present, out of a total of 290, while 110 supported Faraji Dana. The other 15 abstained.
President Hassan Rouhani defended his minister and urged MPs to have greater confidence in him.
Signup to our newsletter and follow us on Facebook and Twitter!
Reformers and moderates had tried in the past few days to defend Faraji Dana's record in office, accusing ultra-conservatives of wanting to weaken the government.
Lawmakers say he nominated as senior department officials people who took part in the movement that challenged the re-election of Mahmoud Ahmadinejad in 2009, seen by the authorities as a "plot".
Faraji Dana was also accused of allowing students to return to university after having been expelled "for moral and political reasons".
He is the first minister in the current government to be the subject of a censure motion.
He was Rouhani's third choice as Minister for Science, Research and Technology after parliament rejected the first two nominees.