Preliminary results in Iran's elections point to a defeat, if not a rout, for allies of the country's hard-line conservative president, Mahmoud Ahmadinejad. As counting progressed last night, the chief winners looked likely to be the country's moderate conservatives, with reformists next, and the hardline conservatives lagging some way behind. In a highly symbolic victory, the former president, Akbar Rafsanjani, was assured election to the Assembly of Experts, the powerful religious group responsible for guiding policy and electing the Supreme Leader.
Formally, of course, President Ahmadinejad and his government will be unaffected by these elections, however unwelcome the results. Voting was for the Assembly of Experts and local councils only. The president's main electoral base, moreover, is in the countryside, so later results may limit the extent of the hardliners' defeat. And the main beneficiaries are moderate conservatives, rather than pro-Western reformers.
For all the caveats, however, the political wind in Iran seems to be blowing in a new direction. Mr Rafsanjani's victory followed his humiliation in the 2005 presidential elections, and it was by any measure a remarkable turnaround in his fortunes. The man regarded as his chief rival, Ayatollah Mohammad Yazdi, who is also seen as Mr Ahmadinejad's political inspiration, has enough votes to retain his seat in the Assembly, but came in only sixth. The results of the municipal elections are following a similar pattern. And the turnout, at an average of 60 per cent across the country, was high by recent Iranian standards.
The quality of Iran's democracy may leave much to be desired. But the results and the turnout taken together suggest not only that there is a relatively high level of political engagement in Iran today, but that electors are prepared to cast their votes against the status quo. These elections were always going to be seen as a verdict on Mr Ahmadinejad's controversial presidency. If present trends are borne out, that verdict will be a decisive expression of disapproval.
The question is: what effect will this negative verdict have on Iran's government and its policies? Probably, the president and his supporters will try to dismiss the results as irrelevant for the central government, or at most a disappointment. But Mr Ahmadinejad is already well past his honeymoon period. At home, he has found it harder to improve the lives of impoverished Iranians as quickly as he had hoped. His clumsy conduct of foreign policy, rhetorically tailored to his home audience, has been a serious liability abroad. A poor poll performance now could undercut his authority, and he could come under pressure to change tack.
Until now, Mr Ahmadinejad has sent ambiguous signals about how he envisages relations with the outside world. In his own terms, he has also been fortunate. US difficulties in Iraq and the upsurge in violence in the Middle East have left Iran the dominant regional power. Tehran has used its position of strength to reject all concessions on its nuclear programme, justifiably accusing Western countries of applying a double standard. A stand-off at the UN Security Council looks hard to avoid in the New Year.
The hardliners' election defeat suggests that Iranians would prefer their government to pursue a less ideologically driven policy towards the West. At best, this could encourage Mr Ahmadinejad to accept a compromise on the nuclear issue. At worst, though, it could force him on to the defensive and make him even more stubborn than before. It will take agile and well-directed Western diplomacy to tease a more normal relationship out of this domestic electoral defeat.