First the cop screamed abuse at Mir Hossein Mousavi's supporter, a white-shirted youth with a straggling beard and unkempt hair. Then he smashed his baton into the young man's face. Then he kicked him viciously in the testicles. It was the same all the way down to Vali Asr Square. Riot police in black rubber body armour and black helmets and black riot sticks, most on foot but followed by a flying column of security men, all on brand new, bright red Honda motorcycles, tearing into the shrieking youths – hundreds of them, running for their lives. They did not accept the results of Iran's presidential elections. They did not believe that Mahmoud Ahmadinejad had won 62.6 per cent of the votes. And they paid the price.

"Death to the dictator," they were crying on Dr Fatimi Street, now thousands of them shouting abuse at the police. Were they to endure another four years of the smiling, avuncular, ever-so-humble President who swears by democracy while steadily thinning out human freedoms in the Islamic Republic? They were wrong, of course. Ahmadinejad really does love democracy. But he also loves dictatorial order. He is not a dictator. He is a Democrator.

Yesterday wasn't the time for the finer points of Iranian politics. That Mir Hossein Mousavi had been awarded a mere 33 per cent of the votes – by midday, the figure was humiliatingly brought down to 32.26 per cent – brought forth the inevitable claims of massive electoral fraud and vote-rigging. Or, as the crowd round Fatimi Square chorused as they danced in a circle in the street: "Zionist Ahmadinejad – cheating at exams." That's when I noticed that the police always treated the protesters in the same way. Head and testicles. It was an easy message to understand. A smash in the face, a kick in the balls and Long Live the Democrator.

Download the new Independent Premium app Sharing the full story, not just the headlines

Many of the protesters – some of them now wearing scarves over their faces, all coloured green, the colour of Mousavi's campaign – were trying to reach the Interior Ministry where the government's electoral council were busy counting (or miscounting, depending on your point of view) Friday's huge popular national vote. I descended into the basement of this fiercely ugly edifice – fittingly, it was once the headquarters of the Shah's party, complete with helipad on the roof – where cold chocolate lattes and strawberry fruitcake were on offer to journalists, and where were displayed the very latest poll results, put up at 10.56am Iranian time.

Eighty per cent of the votes had been counted and the results came up as Ahmadinejad 64.78 per cent; Mousavi 32.26 per cent; Mohsen Rezai (a former Revolutionary Guard commander) 2.08 per cent; and Mehdi Karoubi (a former parliament speaker) a miserable 0.89 per cent. How could this be, a man asked me on a scorching, dangerous street an hour later. Karoubi's party has at least 400,000 members. Were they all sleeping on Friday?

There were a few, sparse demonstrators out for the Democrator, all men, of course, and many of them draped in the Iranian flag because the Democrator – devout Muslim as he always displays himself – wrapped his election campaign in the national flag. Each of these burly individuals handed out free copies of the execrable four-page news-sheet Iran.

"Ahmadinejad," the headline read, "24 million votes. People vote for Success, Honesty and the Battle against Corruption." Not the obvious headline that comes to mind. But Mousavi's Green Word newspaper allegedly had its own headline dictated to it by the authorities – before they shut it down yesterday: "Happy Victory to the People." And you can't get more neutral than that.

Back on the streets, there were now worse scenes. The cops had dismounted from their bikes and were breaking up paving stones to hurl at the protesters, many of them now riding their own motorbikes between the rows of police. I saw one immensely tall man – dressed Batman-style in black rubber arm protectors and shin pads, smashing up paving stones with his baton, breaking them with his boots and chucking them pell mell at the Mousavi men. A middle-aged woman walked up to him – the women were braver in confronting the police than the men yesterday – and shouted an obvious question: "Why are you breaking up the pavements of our city?" The policeman raised his baton to strike the woman but an officer ran across the road and stood between them. "You must never hit a woman," he said. Praise where praise is due, even in a riot.

But the policemen went on breaking up stones, a crazy reverse version of France in May 1968. Then it was the young men who wanted revolution who threw stones. In Tehran – fearful of a green Mousavi revolution – it was the police who threw stones.

An interval here for lunch with a true and faithful friend of the Islamic Republic, a man I have known for many years who has risked his life and been imprisoned for Iran and who has never lied to me. We dined in an all-Iranian-food restaurant, along with his wife. He has often criticised the regime. A man unafraid. But I must repeat what he said. "The election figures are correct, Robert. Whatever you saw in Tehran, in the cities and in thousands of towns outside, they voted overwhelmingly for Ahmadinejad. Tabriz voted 80 per cent for Ahmadinejad. It was he who opened university courses there for the Azeri people to learn and win degrees in Azeri. In Mashad, the second city of Iran, there was a huge majority for Ahmadinejad after the imam of the great mosque attacked Rafsanjani of the Expediency Council who had started to ally himself with Mousavi. They knew what that meant: they had to vote for Ahmadinejad."

My guest and I drank dookh, the cool Iranian drinking yoghurt so popular here. The streets of Tehran were a thousand miles away. "You know why so many poorer women voted for Ahmadinejad? There are three million of them who make carpets in their homes. They had no insurance. When Ahmadinejad realised this, he immediately brought in a law to give them full insurance. Ahmadinejad's supporters were very shrewd. They got the people out in huge numbers to vote – and then presented this into their vote for Ahmadinejad."

But of course, the streets of Tehran were only a hundred metres away. And the police were now far more abusive to their adversaries. My own Persian translator was beaten three times on the back. The cops had brought their own photographers on to the pavements to take pictures of the protesters – hence the green scarves – and overfed plain-clothes men were now mixing with the Batmen. The Democrator was obviously displeased. One of the agents demanded to see my pass but when I showed my Iranian press card to him, he merely patted me on the shoulder and waved me through.

Thus did I arrive opposite the Interior Ministry as the police brought their prisoners back from the front line down the road. The first was a green-pullovered youth of perhaps 15 or 16 who was frog-marched by two uniformed paramilitary police to a van with a cage over the back. He was thrown on the steel floor, then one of the cops climbed in and set about him with his baton. Behind me, more than 20 policemen, sweating after a hard morning's work bruising the bones of their enemies, were sitting on the steps of a shop, munching through pre-packed luncheon boxes. One smiled and offered me a share. Politely declined, I need hardly add.

They watched – and I watched – as the next unfortunate was brought to the cage-van. In a shirt falling over his filthy trousers, he was beaten outside the vehicle, kicked in the balls, and then beaten on to a seat at the back of the vehicle. Another cop climbed in and began batoning him in the face. The man was howling with pain. Another cop came – and this, remember, was in front of dozens of other security men, in front of myself, an obvious Westerner, and many women in chadors who were walking on the opposite pavement, all staring in horror at the scene.

Now another policeman, in an army uniform, climbed into the vehicle, tied the man's hands behind his back with plastic handcuffs, took out his baton and whacked him across the face. The prisoner was in tears but the blows kept coming; until more young men arrived for their torment. Then more police vans arrived and ever more prisoners to be beaten. All were taken in these caged trucks to the basement of the Interior Ministry. I saw them drive in.

A break now from these outrages, because this was about the moment that Mousavi's printed statement arrived at his campaign headquarters. I say "arrived", although the police had already closed his downtown office – Palestine Street, it was called, only fitting since the Iranian police were behaving in exactly the same way as the Israeli army when they turn into a rabble to confront Palestinian protesters – and Mousavi's men could only toss the sheets of paper over the wall.

It was strong stuff. "The results of these elections are shocking," he proclaimed. "People who stood in the voting lines, they know the situation, they know who they voted for. They are looking now with astonishment at this magic game of the authorities on the television and radio. What has happened has shaken the whole foundation of the Islamic Republic of Iran and now it is governing by lies and dictatorship. I recommend to the authorities to stop this at once and return to law and order, to care for the people's votes. The first message of our revolution is that people are intelligent and will not obey those who gain power by cheating. This whole land of Iran belongs to them and not to the cheaters."

Mousavi's head office in Qeitariyeh Street in north Tehran had already been besieged by the Democrator's loyal "Basiji" volunteers a few hours earlier. They had chucked tear gas at the windows. They were still smouldering when I arrived. "Please go or they will come back," one of his supporters pleaded to me. It was the same all over the city. The opposition either asked you to leave or invited you to watch them as they tormented the police. The Democrator's men, waving their Iranian flags, faced off Mousavi's men. Then, through their ranks, came the armed cops again, running towards the opposition. So whose side were the police really on? Rule number one: never ask stupid questions in Iran.

Last night, all SMS calls were blocked. The Iranian news agency announced that, since there would be no second round of elections, there would be no extension of visas for foreign journalists – one can well see why – and so many of the people who were praised by the government for their patriotism in voting on Friday were assaulted by their own government on Saturday.

Last night, the Democrator was still silent, but his ever-grinning face turned up on the posters of his supporters. There were more baton charges, ever greater crowds running from them. Thus was the courage of Friday's Iranian elections turned into fratricidal battles on the streets of Tehran. "Any rallies," announced the Tehran police chief, General Ahmad Reza Radan, "will be dealt with according to the law." Well, we all know what that means. So does the Democrator.

Mahmoud Ahmadinejad

Mahmoud Ahmadinejad is the blacksmith's son and former Revolutionary Guard, who, since his surprise victory four years ago, has seemingly gone out of his way to play bogeyman to the US. In his first term in office, Mr Ahmadinejad became known for his fierce rhetoric against America and Israel, his proud promotion of Iran's nuclear programme and persistent questioning of the Holocaust.

In Iran, he benefited from a surge in petrodollar revenues and has distributed loans, money and other help on his frequent provincial tours. But critics say his free spending fuelled inflation and wasted windfall oil revenues without reducing unemployment. Prices of basics have risen sharply, hitting more than 15 million Iranian families who live on less than $600 a month. He blamed the inflation, which officially stands at 15 per cent, on a global surge in food and fuel prices that peaked last year, and pursued unorthodox policies such as trying to curb prices while setting interest rates well below inflation.

During the campaign, in a series of bitter TV debates with his three rivals, he was repeatedly accused of lying about the extent of price rises. Mir Hossein Mousavi also accused Mr Ahmadinejad, 53, of undermining Iran's foreign relations with his fiery anti-Western speeches and said Iranians had been "humiliated around the globe" since he was first elected.

During Mr Ahmadinejad's first term, the UN Security Council imposed three sets of sanctions on Iran over its nuclear programme, which the West suspects has military aims.

Mr Ahmadinejad, the first non-clerical president in more than 25 years, basks in the support of Iran's Supreme Leader, Ayatollah Ali Khamenei, who called on Iranians to vote for an anti-Western candidate. The Ayatollah ultimately calls the shots in Iran, where the president can only influence policy, not decide it.

Mir Hossein Mousavi

Life for President Barack Obama would be a great deal easier if Mir Hossein Mousavi had won Iran's election. The man who was prime minister during the Iran-Iraq war of the 1980s says he would seek detente with the West, ask Mr Obama to debate at the UN with him, and floated the idea of an international consortium overseeing uranium enrichment in Iran.

On the domestic front, the 67-year-old architect and painter urged a return to the "fundamental values" of the Islamic Republic's founder, Ayatollah Ruhollah Khomeini. He advocated economic liberalisation, and pledged to control inflation through monetary policies and make life easier for private business. He has also promised to change the "extremist" image that Iran has earned abroad under Mr Ahmadinejad and has hit out at his profligate spending of petrodollars and cash hand-outs to the poor, which, he says, have stoked rising consumer prices. He also advocated removing the ban on private firms owning TV stations.

Mr Mousavi has been politically silent for the past 20 years, but he broke new ground in Iranian campaigning by having his wife, Zahra Rahnavard, a former university chancellor, not only join him on the stump but work for him. The couple even held hands at rallies, rare behaviour for politicians in the socially conservative state. His support was largely urban, and mostly young. He enjoyed also the backing of reformist former president Mohammad Khatami and apparent backing from Mr Khatami's pragmatic predecessor, Ali Akbar Hashemi Rafsanjani.

He was widely expected to make a close-run thing of the election. But even as he was claiming a premature victory on Friday night, Mr Mousavi was alleging widespread malpractice in the conduct of the election. Where he goes from here – apart from into history – is far from clear.