Iran's parliament voted overwhelmingly Wednesday against impeaching the education minister, in a victory for President Hassan Rouhani over hardliners.
Critics had accused Education Minister Ali Asghar Fani, part of Iran's reformist camp, of failing to address complaints from teachers over low salaries.
But the impeachment effort, led by ultra-conservatives, was seen as an attack on the government of moderate Rouhani.
The impeachment motion was rejected by 167 lawmakers in the 290-seat parliament, with 76 voting in favour.
It had been expected to fail after the majority group in parliament, the moderate conservative "Followers of the Leader" faction, had assured the minister of its support.
Signup to our newsletter and follow us on Facebook and Twitter!
A member of faction, Behrouz Nemati, denounced the motion as "partisan hostage-taking by anti-government lawmakers".
Fani defended his record in parliament, telling lawmakers that he had been dealing with problems "inherited from the past" in his 22 months in office.
Lawmakers backing the motion denied any ulterior motives, but also suggested Fani was using his office for political purposes.
One of them, Farhad Bashiri, said "the ministry has become the campaign headquarters of certain individuals" ahead of parliamentary elections in February next year.
Iranian reformists are hoping for a comeback in the conservative-controlled parliament in next year's vote.
They virtually disappeared from the chamber in the last legislative election in 2012, following the banning of two major reformist parties in the crackdown against the protest movement that opposed former president Mahmoud Ahmadinejad's re-election in 2009.
Parliament last August successfully impeached then-science minister Reza Faraji Dana, a reformist who had been accused of appointing officials to his cabinet who participated in the June 2009 protests.