By Nick Assinder
Political Correspondent, BBC News website
Tony Blair has achieved his greatest dream of taking Labour to a genuinely historic third election victory in a row.
But voters sent a pretty clear message of protest at his leadership by slashing his majority and share of the vote.
And now Britain has its Labour government, all eyes will turn onto who will be the prime minister actually running it for the next four or five years.
Speculation will intensify over leadership
Thanks to Tony Blair's pre-announced resignation, and Gordon Brown's pivotal role in the election campaign, that is a question bound to dominate politics until it is resolved.
For the moment, however, Labour and the prime minister will feel a mixture of relief and delight at their success in winning that third victory.
To achieve it after eight often controversial years in power is a major achievement in anybody's book. It would once have been deemed fantasy for Labour to even countenance it, and many might think that should be enough for the prime minister.
Tony Blair is unlikely to think so, and once the celebrations are over, he will face the dilemma of how he cuts off that leadership speculation while, at the same time, securing his legacy.
And there may be only one way to do that - by handing over to Gordon Brown sooner rather than later.
This time, with the electorate apparently voting Labour despite rather than because of Mr Blair, the Brown camp, and maybe even the chancellor himself, are unlikely to be put off.
Many already believe Mr Blair's surprise announcement last summer that he would not stand for a fourth term was a mistake by making him a lame duck prime minister and guaranteeing leadership speculation would start the day after the election.
One option almost certainly closed off to him after the joint-leadership campaign and Mr Brown's backing over the war is to sack or reshuffle the chancellor.
Mr Blair has pledged not to stay on
The result has further ensured that is now unthinkable.
Mr Blair's great concern will be securing his legacy, over and above the simple label "triple winner".
And even if he believes history will treat him kindly over the war, he will want something else to be remembered for other than that hugely controversial conflict.
Perhaps Europe will be the thing. Assuming there is a referendum on the EU constitution in the spring of 2006, he may want to cast himself as the man who cemented Britain's place in the EU.
But to do that will require a huge campaign to turn around voters currently opposed to the constitution.
There is, therefore, the possibility he could lose that referendum and rather than going out as the victor, face certain resignation under the cloud of "loser".
It is worth remembering that the only prime minister in recent history who has gone at a time of his own choosing and while still at the top was Labour's Harold Wilson in 1976.
The general election may be over, but the bigger question for the prime minister remains unanswered.