With his wife Sarah by his side, Gordon Brown paid an emotional farewell to Downing Street after almost three turbulent years as Prime Minister.
Mr Brown, his voice cracking during his brief statement to the cameras, said: "I loved the job not for its prestige, its titles and its ceremony – which I do not love at all. No, I loved the job for its potential to make this country I love fairer, more tolerant, more green, more democratic, more prosperous and more just – truly a greater Britain."
His final appearance as Prime Minister ended with a tribute to Sarah and to their two young sons, John and Fraser, for the "love and joy they bring to our lives". At that point the children, who are rarely seen in public, emerged from inside Downing Street. Mr Brown kissed each of them on the head and gave a final wave as he walked towards the waiting cars to take him to Buckingham Palace.
Last night Labour's depleted band of MPs was preparing to return to opposition – and for a leadership contest over the summer.
Ed Balls, the outgoing Schools Secretary and Mr Brown's closest cabinet ally, said: "It is a sad day for the Labour Party, but at the same time Gordon Brown can go out with pride in his great achievements in government over 13 years. It's the end of an era."
The first tangible evidence that 13 years of Labour government were ending had come three hours earlier when cases were spotted being packed into vans at the back of Downing Street.
Inside the historic building, the mood was as dark as its famous black door as Mr Brown and his trusted inner circle, including Lord Mandelson, Ed Miliband, Mr Balls and Lord Adonis, finally realised their desperate attempt to stitch together an anti-Tory coalition was futile. Mr Brown's team denied they failed because of fears that a hastily-assembled "rainbow coalition" would contain so many competing factions and interests that it would constantly be on the brink of collapse.
They insisted the real reason was a series of unrealistic policy demands by the Liberal Democrats.
One Labour cabinet minister said: "I'm afraid we never got past first base. Nick Clegg was intent on doing a deal with the Tories all along."
As they attempted to keep their dream of coalition alive, dismayed Labour ministers also realised they were also struggling to bring their own MPs – many of whom cannot abide the Liberal Democrats and oppose electoral reform – round to the idea.
Two senior Labour cabinet ministers – the outgoing Justice Secretary Jack Straw and the outgoing Health Secretary Andy Burnham – also joined the rebellion against the deal.
Mr Straw made clear he would have quit if the coalition plan went ahead, while Cabinet unity was blown apart as Mr Burnham went public with his opposition. He said: "We have got to respect the result of the general election and you cannot get away from the fact that Labour didn't win."
Not for the first time senior ministers had failed to take into account the feelings of their foot soldiers: Labour MPs were livid that, unlike their Tory and Liberal Democrat counterparts, their leadership had not held a meeting with them to explain what was happening.
One said: "It is typical of Gordon to involve us too late. Whoever comes next will have to change their style."
Jon Cruddas, a likely candidate for the leadership, said he welcomed discussion about a power-sharing deal, but insisted it should be approved by the wider party to ensure it was "stable and strong". He added that Labour members up and down the country who were fighting hard against the Liberal Democrats wanted to know the parameters of that discussion.
There was also growing anger across the party yesterday that the leadership seemed determined to defy electoral gravity and try to cling on to office.
In a blunt intervention on Radio 4's Today programme, David Blunkett, the former home secretary, warned that any "coalition of the defeated" would spell electoral disaster for Labour and accused the Liberal Democrats of acting like "every harlot in history".
A stream of party heavyweights – including Lord Falconer, the former Lord Chancellor, took to the airwaves to echo his sentiment.
Although none expressed the sentiment publicly, there were also baser motives driving some Labour MPs' opposition to limping on in government.
One London MP said: "We need to refresh ourselves in opposition. While that is happening, the Tories and Liberals will have to make swingeing cuts and will get the blame for that. That would open the door for us at the next election."
*Harriet Harman, the Leader of the Commons and Labour's deputy leader, last night took over as acting party leader until Mr Brown's successor is chosen. Labour sources said a leadership contest would now be speeded up from the plans first announced by Mr Brown on Monday. Labour's National Executive Committee (NEC) will meet next week to fix the timetable, and a new leader could be in place within two months.
'I want to thank Sarah': Brown's resignation speech
Gordon Brown tendered his resignation as Prime Minister last night. He made the announcement in Downing Street, accompanied by his wife, Sarah. Here is a transcript of his resignation speech:
As you know, the general election left no party able to command a majority in the House of Commons.
I said I would do all that I could to ensure a strong, stable and principled government was formed, able to tackle Britain's economic and political challenges effectively.
My constitutional duty is to make sure that a government can be formed following last Thursday's general election.
I have informed the Queen's private secretary that it is my intention to tender my resignation to the Queen.
In the event that the Queen accepts, I shall advise her to invite the Leader of the Opposition to form a government.
I wish the next Prime Minister well as he makes the important choices for the future.
Only those that have held the office of Prime Minister can understand the full weight of its responsibilities and its great capacity for good.
I have been privileged to learn much about the very best in human nature and a fair amount too about its frailties, including my own.
Above all, it was a privilege to serve. And yes, I loved the job not for its prestige, its titles and its ceremony – which I do not love at all.
No, I loved the job for its potential to make this country I love fairer, more tolerant, more green, more democratic, more prosperous and more just – truly a greater Britain.
In the face of many challenges in a few short years, challenges up to and including the global financial meltdown, I have always strived to serve, to do my best in the interest of Britain, its values and its people.
And let me add one thing also. I will always admire the courage I have seen in our armed forces.
And now that the political season is over, let me stress that having shaken their hands and looked into their eyes, our troops represent all that is best in our country and I will never forget all those who have died in honour and whose families today live in grief.
My resignation as leader of the Labour Party will take effect immediately. And in this hour I want to thank all my colleagues, ministers, members of Parliament. And I want to thank, above all, my staff, who have been friends as well as brilliant servants of the country.
Above all, I want to thank Sarah for her unwavering support as well as her love, and for her own service to our country.
I thank my sons, John and Fraser, for the love and joy they bring to our lives.
And as I leave the second most important job I could ever hold, I cherish even more the first – as a husband and father.
Thank you and goodbye.
The oldest and wiliest operator in the Cabinet was not involved in attempts to cobble together an anti-Tory coalition, but was instrumental in preventing it from happening. Mr Straw, who was elected as an MP shortly after the Lib-Lab pact of 1977-78 came apart, believed a coalition would have been viewed by the public as a cynical attempt to hang on in office. He will not stand for the party leadership, but could be a "kingmaker" in the succession.
The Blairite young minister who swore his loyalty to Gordon Brown during last year's failed leadership coup might be viewed as a natural supporter of an eventual move towards a progressive alliance. But Mr Burnham, seen by some Labour MPs as a dark-horse candidate for the leadership, warned that Mr Brown and his team were ignoring the verdict of the voters. His comments struck a chord with backbenchers disillusioned over a tie-up with their Liberal Democrat rivals.
The former Home Secretary vividly remembers his outrage when Edward Heath "lost" the February 1974 election and still tried to cling on in power for a weekend. He will have detected a clear parallel with his party's desperate manoeuvres over the past four days. Mr Blunkett is also a passionate supporter of the "first past the post" system and naturally pacts hammered out behind the scenes. He spoke for many of the older timers on the Labour benches.