An exhausted Gordon Brown only managed two snatched hours of sleep yesterday as he attempted to salvage a share of power for Labour from the dramatic general election result.
Despite seeing his party slump to its lowest share of the vote since 1983, the Prime Minister rapidly realised he did not need to summon the removal vans to Downing Street just yet.
Upon returning home at 5.30am with Lord Mandelson at his side, he even managed a weak joke in a brief speech to staff, telling his unofficial deputy that the Labour Party now loved him. A decade earlier Tony Blair had quipped that Labour's modernisation would be complete when the party learned to love Peter Mandelson.
After a short nap in the Downing Street flat, Mr Brown immediately spoke to Sir Gus O'Donnell, the Cabinet Secretary, to check the constitutional position of a hung parliament.
Sir Gus, who is also the head of the civil service, confirmed that he was still Prime Minister until a credible alternative emerged. He also reminded Mr Brown that he had a duty to emphasise the continuity of government as negotiations continued over the complexion of the next administration.
It meant, for instance, that Alistair Darling remained Chancellor for the moment and should participate in a conference call with other G7 finance ministers to discuss the crisis gripping the eurozone, which he did yesterday. Other Cabinet ministers would also continue to receive their red boxes.
Mr Brown, described by one colleague yesterday as "calm and focused", was also receiving more base political advice from his most trusted confidants, including Lord Mandelson and Ed Balls.
They told him to continue appearing prime ministerial and portray himself as a kindred spirit of the Liberal Democrats, to remind Nick Clegg that he was ready to discuss a possible deal, including an early referendum on electoral reform if the Lib Dem leader walked out of talks with Mr Cameron.
Senior Labour figures also started privately sounding out their Liberal Democrat opposite numbers to stress the extent of policy common ground between the two parties.
Mr Brown's advisers, who were allowed back into Downing Street yesterday because the election campaign was over, grabbed lunch on the run as they agreed with the Prime Minister the wording of a statement in which he signalled his readiness to do a deal.
Just before 2pm, Mr Brown emerged from No 10 to declare: "Mr Cameron and Mr Clegg should clearly be entitled to take as much time as they feel necessary. For my part, I should make clear that I would be willing to see any of the party leaders.
"Clearly, should the discussions between Mr Cameron and Mr Clegg come to nothing, then I would of course be prepared to discuss with Mr Clegg the areas where there may be some measure of agreement between our two parties."
Mr Brown placed heavy emphasis on Labour's commitment to "immediate legislation" to hold a referendum on changing the voting system for Westminster elections. His overtures were reinforced by a series of interviews by senior Labour figures spelling out their support for a "progressive alliance" to enter into a coalition government.
The party's deputy leader, Harriet Harman, said: "If ultimately there is a majority of people who voted against the Conservatives and a majority of MPs who are not Tories and they can work together, then actually that is a majority government and therefore reflects the way the country has voted."
Peter Hain, the Welsh Secretary, a long-standing supporter of electoral reform, said the election result presented "a once-in-a-political-lifetime opportunity" for the Liberal Democrats to reform the electoral system. He said: "I hope they take it, because our Labour government stands ready to offer it."
Jim Murphy, the Scottish Secretary, said: "Let's see what happens over the next day or so. I think Gordon can put together a coalition."
Although Labour lost more than 90 seats, the prevailing mood in party headquarters yesterday was profound relief that its worst fears had not come to pass. It emerged well ahead of the Liberal Democrats in the popular vote, and every member of the Cabinet held his or her seat.
One campaigner said: "We have a huge amount to be proud of. We were completely written off and written out of this election campaign. To get to the position we have is an amazing achievement."
The party pointed to its success in defending all 41 of the seats it won at the last election in Scotland and all but two of its 27 seats in the North-east of England. But elsewhere in the UK it was in retreat, losing 12 seats in the North-west, nine in Yorkshire and Humberside, 14 in the West Midlands, 11 in the East Midlands and four in Wales.
Outside London – where its tally of seats dropped from 44 to 38 – it has almost vanished from the electoral map south of a line from the Bristol Channel to the Wash. It now holds only four seats in the South-west, four in the South-east and two in the East of England and is trailing a distant third in each of the regions.
Whether in opposition or as part of a coalition government, the party now faces a major task of reconstruction. It needs to emulate Tony Blair's ability to reach out to middle-class and skilled working-class voters in towns and cities as diverse as Norwich, Swindon, Dover and Stafford.
The question of Mr Brown's position remains, with senior Labour figures refusing to rule out the scenario of his resignation as the price for wooing the Liberal Democrats into a coalition.
Asked if a change of leader was inconceivable, Lord Mandelson said: "There are quite a number of permutations. And the reason I don't want to start getting into hypotheses about what may or may not happen is because ... I think it's premature."
There were also those who detected a valedictory note in Mr Brown's address in Downing Street: he knows his future is, for the moment, being measured in days.
It's hello to...
26-year-old local who manages a women's refuge; won Houghton and Sunderland South.
Gloria de Piero
Parachuted in at short notice, the GMTV presenter won Geoff Hoon's Ashfield seat.
It's goodbye from...
One half of "Mr and Mrs Expenses", the Health minister lost to the Tories in Brentford and Isleworth.
Chair of Committee on Human Rights and fan of trips to Cyprus; lost Hendon to the Tories.Reuse content