The election sparked weeks of protests by critics of President Ahmadinejad
Iran has released on bail the last of the British embassy employees arrested in Tehran in connection with last month's election protests.
Hossein Rassam - the embassy's chief political analyst - was one of nine local embassy staff originally held.
He was charged with inciting the unrest over President Mahmoud Ahmadinejad's re-election and is due to stand trial.
Britain has denied Tehran's accusations that embassy staff had been involved in instigating mass demonstrations.
Abdolsamad Khorramshahi, a lawyer for the released employee, said he had left Tehran's Evin prison, and that bail had been set at about $100,000 (£61,000).
British Foreign Secretary David Miliband welcomed Mr Rassam's release, adding: "The detention of Embassy staff was completely unjustified."
Violent street protests broke out after President Mahmoud Ahmadinejad was re-elected in the 12 June vote.
At least 20 people are thought to have died during weeks of clashes.
12 June presidential election saw incumbent Mahmoud Ahmadinejad re-elected with 63% of vote
Main challenger Mir Hossein Mousavi called for result to be annulled for electoral fraud
Street protests saw at least 17 people killed and foreign media restricted
All gatherings were banned and the protests have died down in recent weeks.
Iran has repeatedly accused foreign powers - especially Britain and the US - of stoking the demonstrations.
Opposition candidate Mir Hossein Mousavi says the vote was rigged in favour of Mr Ahmadinejad.
The president and Iran's main election body, the Council of Guardians, have rejected the charge.
On Friday former President Ali Akbar Rafsanjani called for the release of jailed protesters.
Speaking at Tehran University, he also said many Iranians still doubted the election results, and that the media should be allowed to discuss the dispute openly.
"It is not necessary to pressure media. We should allow them to work freely within the law," he said.
As Mr Rafsanjani spoke, thousands of opposition supporters rallied near the university - the first opposition demonstration for more than a week.