By Jon Leyne
BBC News, Tehran
On the face of it, the victory was fairly overwhelming.
His supporters won, but the president could face new challenges
By Sunday evening, conservatives had won four times as many seats as the reformists, retaining control of the Iranian parliament.
No doubt they will take it as an endorsement of their uncompromising view of Iran's Islamic system, of the nuclear programme, and of Iran's assertive foreign policy.
No doubt they will conveniently forget that a large proportion of the reformist candidates were disqualified.
And the cards were stacked against reformists in other ways. They were often not allowed to hold public rallies. Their newspapers were regularly closed down.
Nevertheless, even in Tehran, where voters did have a range - sometimes a bewildering range - of reformists and conservatives to choose from, supporters of President Mahmoud Ahmadinejad topped the poll.
It all looks like good news for the president, bad news for Western governments hoping for the moderates to temper those aggressive policies.
But as he prepares for the Iranian new year holiday, Mr Ahmadinejad may not quite be uncorking the non-alcoholic Champagne.
Because this parliament could give him a rougher ride than his predecessor.
Ali Larijani is one potential presidential candidate
It is not just the small increase in the number of reformists. They are set to increase their number of seats from around 30 to perhaps 50 in the 290 seat Majlis once run-off elections are completed next month.
The election has also set up a new power struggle within the conservative camp.
The former nuclear negotiator Ali Larijani, who fell out with Mr Ahmadinejad last autumn, secured an impressive victory in the holy city of Qom.
He will head a powerful bloc of more pragmatic conservatives inside the Majlis. He may be offered the job of speaker of parliament.
And that would be an important power base from which to launch a challenge against Mr Ahmadinejad in the presidential election next year.
Divide and rule
Another of these more pragmatic conservatives - they confusingly call themselves reformist conservatives - is the mayor of Tehran, Mohamed Qalibaf.
His presidential ambitions are also no secret. Who more suitable to challenge another former mayor of Tehran, Mr Ahmadinejad?
But the big winner is the supreme leader, Ayatollah Ali Khamenei.
He has managed to help orchestrate a parliament even more loyal to him than its predecessor.
Ayatollah Khamenei appears to have increased his options
And the internal battle within the conservatives may rather suit him. He has always been a leader attached to the principle of "divide and rule."
As for Western governments, they would surely be more comfortable doing business with Mr Larijani, though for them to say as much would doom any presidential hopes he might have before his campaign even starts.
In any case, even to imagine that Mr Ahmadinejad will be defeated in his re-election bid next year is for the West to clutch at straws.
The bigger theme of this election is that the conservatives, the hardliners, are firmly in the driving seat.
And Mr Ahmadinejad still appears to have the strong support of Ayatollah Khamenei and other key figures in the Islamic Republic.
Perhaps what has really happened is the supreme leader and those around him have opened up their options.
A challenger, several challengers, have emerged for the presidency. Mr Ahmadinejad is on notice.
It could be an interesting year in Iranian politics.