The Iranian army has arrested 36 officers who planned to attend last week’s Friday prayer sermon by former president Hashemi Rafsanjani in their military uniforms as an act of political defiance, according to Farsi-language websites.

The officers intended the gesture to show solidarity with the demonstrations against last month’s presidential election result, which was won by Mahmoud Ahmadinejad but which has been clouded by allegations of mass fraud.

Rafsanjani used the sermon at Tehran university to challenge the authority of Iran’s supreme leader, Ayatollah Ali Khamenei, by questioning the result in the presence of the defeated reformist candidate, Mir Hossein Mousavi, and tens of thousands of his supporters.