It started with excitement, but ended with bloodshed as Iran suffered from the aftermath of the election.
Iran's week of turmoil as the world watches
Iran votes and the excitement is almost palpable. No one can remember such expectation, such exhilaration before an election. There are huge queues at polling stations. An estimated 85 per cent of 42 million eligible voters come out to cast their ballot. The incumbent is the President Mahmoud Ahmadinejad. His opponents are the reformers Mir Hossein Mousavi and Mehdi Karroubi and the conservative contender, Mohsen Razai. If no candidate receives 50 per cent of the vote a runoff will be held.
Iran's lively bloggers log their impressions of the day. Bazar Dispatch in Tehran writes: "It is an odd image of Tehran: quiet streets, deserted shopping centers and yet crowded mosques, high schools, schools and colleges. There is an air of a united people present that makes one feel romantic." On Flickr, the photo sharing website, a user named DD/MM/YYYY posts a photograph of himself and a friend with purple ink on their index fingers: "Fingers inked, Fingers crossed. We voted in the 10th Islamic Republic of Iran's Presidential elections."
When the polls close Mr Mousavi and Mr Ahmadinejad both claim victory. Many of Mr Mousavi's supporters are young - 60 per cent of Iran's population is under the age of 30 - some were not born during the 1979 Islamic revolution. They are frustrated because of high unemployment, inflation and heavy social restrictions. They want change. Despite the crushing economic sanctions, Iran's young population is digitally literate. This urbane and middle-class group blog, keep Facebook profiles, tweet on Twitter, share photographs on social networking sites. These young voters will in the coming days transfix the world as they struggle to get their voices heard.
The ebullient mood disappears when the interior ministry announces that Mr Ahmadinejad received a clear majority of 62.6 per cent and Mr Mousavi 34 per cent.
The supreme leader, Ayatollah Ali Khamenei, urges the opposition to accept the results but they allege fraud and demand the elections be annulled. Mr Mousavi, a veteran of the 1979 revolution, writes an open letter on his website Ghalam News: "I use this chance to honour the emotions of the nation of Iran and remind them that Iran, this sacred being, belongs to them and not to the fraudulent." In open defiance of the ayatollah's orders thousands of Mr Mousavi's supporters take to the streets. Angry crowds in Iran's capital break into shops, set cars on fire and shout "death to the dictator". Tehran24, a website which posted harrowing photographs of the aftermath, is blocked.
Its administrator Amir writes: "Thank you so much for warm and kind comments from arround (sic) the world. Unfortunately i can't answer all comments and kindness, but i want all people to support us in Iran." Twitter keeps second by second updates of the day through the popular hashtag #iranelection. An anonymous writer observes: "What a funny way to celebrate the 30th anniversary of the Islamic Revolution".
Mr Khamenei announces that the Guardian Council will investigate allegations of vote rigging. More pro-government rallies take place in Tehran. At least 100 reformer activists are arrested. Mr Ahmadinejad draws his support from the political and clerical establishment and the security forces, including the powerful Revolutionary Guards. The government's crackdown on the media swings into full action.
The Tehran bureau of Al Arabiya, the Dubai-based satellite channel, is shut down by the authorities. The BBC Persian service's satellite signals are jammed from inside Iran. Newspaper websites, TV stations, blogs, are blocked all over the country. A contributor in the city of Isfahan smuggles out a dispatch to Tehranbureau.com, a Boston-based website. He writes that Mr Ahmadinejad is giving away ice cream and cakes to supporters.
"The protests have become localized, in the neighborhoods small contingents of protestors gather, chant, throw stones and before the police can react they retreat to their houses... In response security forces have deployed thousands of motor riding forces, one drives the other one slings his club right and left, a sort of quick response task force. Today I witnessed a motorcade of at least 30 of such odd couples."
But fresh, first-hand accounts are becoming rarer. Many turn to Twitter, the social networking site. A game of cat and mouse begins between Iranians and the security services as people using software programmes race to circumvent firewalls. Esko Reinikainen in Wales posts on Twitterfeed his Cyberwar Guide for Beginners. He advises users to change their location settings to Tehran and time zone to 3.30 + GMT to help Iranian bloggers get around security restrictions. It receives 15,000 hits in four hours. One message that filters through states: "Mr Mousavi calls on all reformist supporters to take part in a peaceful march in 20 cities across Iran tomorrow including the Valinasr square in Teheran."
Mr Mousavi appears in public for the first time since the election at a rally in Tehran which attracts tens of thousands of supporters. The Guardian Council says it has received complaints from candidates and a ruling will be issued within 10 days. Text messaging services are interrupted, international journalists are arrested or expelled. At least seven demonstrators are killed. Iranian newspapers are not covering the violence.
Iranfax.org, set up by students at the University of Chicago, claims to have received an account from a resident of Tehran who took part in the demonstrations: "I just heard the gunshots but my sister who had been on the scene at that part told me later that she saw four militia came out from a house and shot a girl. Then they shot a young boy in his eye and the bullet came out of his ear." He described being beaten by a group of militiamen.
"My elbow hurts severely. Then, a young man from their group came and kissed my elbow. I told him, 'You know, I don't hate you. I am like you with the only difference that I know more and you are ignorant.' He apologized and left." He added: "I felt proud to find myself among such a huge number of passionate people who were showing the most reasonable act of protest. Frankly I didn't expect such a political maturity." Twitter delays a scheduled upgrade to its network until the following day because it has become a vital communications link in Iran. The postings flood in. An unnamed observer writes: "7 deaths! 2 shot [to] death. Nobody will go to office today as a strike. I will stay at home." It is now being called the Twitter Revolution.
The main electoral authority says it will conduct a partial recount at sites where candidates claim irregularities. A re-election is ruled out.
Unrest spreads to the major cities of Isafan, Shiraz and Mashhad. Anti-riot police line the streets. A contributor posts on Twitter's #iranelection: "police are now firing live rounds into crowds, telling them "you deserve to die". So far, eight have died. On Tehranlive.org, Ali from Shiraz responds: "To those who support Ahmedinijad in Tehran we are with you! Don't let these people remove 30 years of independence and dignity!"
Flickr accounts which were flooded with images of opposition rallies in the days before the election have with few exceptions gone quiet. Evgeny Morozov, a fellow at the Open Society Institute in New York, writes in a blog that it is difficult to know if the government is banning websites. "When millions of people are suddenly trying to get online at the same time it's logical that resources may simply become unavailable or take too much to load."
People defy the supreme leader's calls to unite behind the state. Up to 500,000 people in Tehran march in silence to mourn the dead protesters. Many wear green, the colour of Mr Mousevi's campaign. Mr Mousevi is being called the "Gandhi of Iran". The images broadcast on YouTube show a sea of humanity moving in near silence, most holding one arm in the air and small cameras in the other.
YouTube is flooded with their videos and the world is transfixed. One clip is viewed 104, 654 times. One commentator writes: "Iran, the whole world is watching and supporting." The Revolutionary Guards threaten Iran's online media with legal action if their sites publish material that creates "tension." University dorms are said to be attacked by the basiji, the volunteer militia force. There are unconfirmed reports of students being killed. Every few minutes there is an update on Twitter from an anonymous student:
"They have been holding a sit-in in Tehran University starting yesterday and it is still going on... 50 professor resigned yesterday and were asking for the body of killed students... 40 minutes ago I hear people are chanting Allohakbar on their roof-tops, on all roof tops. Now people are shouting "Death to dictator"... oh gun shots!!! I hope it is in the air only... I have to go my dear... the shouts are getting louder and louder".
The Guardian Council begins a "careful examination" of the election result complaints and calls Mr Mousavi and the two other opponents to a meeting on Saturday. Babak from Shiraz writes on the BBC news forum and implicitly criticises the government: "The majority of urban educated people do not want a lier (sic) that spreads hatred. Some naive uneducated people still believe in the widespread propaganda." The world is watching but most Iranians know little about what is going on. Mobile phone networks have been shut down or are sporadic, says a writer on BBC News Forum. "If no fraud occurred why they keep blocking web sites and news channels, why has SMS stopped working since Friday, why we don't have access to our yahoo emails?"
Google and Facebook rush out Farsi translation tools. Mr Khamenei speaks to the nation for the first time since the election at a Friday sermon. In a veiled attack on the BBC and its Farsi service, he calls the election a "political earthquake for the enemies of Iran and calls Britain "the most evil of them".
Responding in the comments section of the BBC website, Saman from Tehran posts: "Mr Khamenei made his position extremely clear. He hasn't left any room for anything else to be said. Tomorrow, Saturday, there will be a massive gathering in Enghelab Square [Revolution Square] in Tehran. With the tone that Mr Khamenei used, it seems they intend to make more martyrs out of our loved ones. I am sorry that Mr Khamenei is using this tone, seeing as very soon he will be consigned to history's dustbin."