Labour chiefs were preparing to try to broker a power-sharing deal with the Liberal Democrats as Britain headed for a hung parliament.
Labour was braced to lose more than 90 seats in a swing to the Conservatives of more than 5 per cent, leaving it with between 250 and 260 MPs.
In patchy early results, the party lost seats across England and in north and south Wales. But Labour managed to resist concerted Tory challenges in several of its most vulnerable seats.
Despite the slump in support for Labour, the party was pinning its hopes of retaining power on striking a deal with Nick Clegg's party. Lord Mandelson, Labour's election supremo, confirmed Gordon Brown would try to stay on in Downing Street if David Cameron failed to secure an overall Commons majority. He said: "The constitutional conventions are very clear. The rules are that if it's a hung parliament, it's not the party with the largest number of seats that has first go – it's the sitting government."
Pressed again on whether Labour would offer a deal to the Liberal Democrats to hold on to power, he replied: "I have no problem in principle in trying to supply this country with a strong and stable government."
David Miliband, the Foreign Secretary, said: "If no party has an absolute majority, no party has a moral right to a monopoly of power."
He added that under those circumstances the voters would have given politicians "an injunction to talk to each other" to see if "strong and stable" government could be achieved.
His brother, Ed Miliband, the Energy and Climate Change Secretary, said: "I think at the end of this, we need stable government."
Asked about the possibility of Labour and Liberal Democrats working together, he said: "Clearly, that's one possibility. Those discussions would have to take place between Gordon Brown and Nick Clegg."
Ministers also insisted the country was not switching in large numbers to the Conservatives. Labour was relieved that the direst predictions of collapse in its support did not come true, but will face recriminations over a campaign that failed to catch fire.
Mr Brown was due to fly to London early today to assess the general election result after attending the count in his Kirkcaldy and Cowdenbeath constituency. He held on to his Fife seat with a overwhelming majority of 23,007.
But elsewhere in the country the party faced a backlash from the voters. The swing against Labour was confirmed in the first result to be declared less than hour after the polls closed.
Although Bridget Phillipson comfortably held on to its safe seat of Houghton and Sunderland South with a majority of 10,990, the result revealed a swing to the Conservatives of 8.4 per cent. In neighbouring Washington and Sunderland West, another safe Labour seat, the swing against the party was even bigger at 11.5 per cent.
Labour suffered a triple early setback in Wales, losing Arfon to Plaid Cymru and Aberconwy and Vale of Glamorgan to the Conservatives. But there was a fillip for Labour after it held on to marginal Ynys Mon – the island of Anglesey – in the face of a Plaid Cymru challenge.
Shortly afterwards the Conservatives demolished a 6,145 Labour majority in Kingswood, near Bristol, with a swing of 9.4 per cent. The new Essex constituency of South Basildon and East Thurrock also fell into Tory hands, along with the Midlands seats of Loughborough, Nuneaton and Tamworth. Dover, where the Labour majority had been more than 5,000, was also captured by the Tories.
Labour lost Burnley to the Lib Dems in a 9.6 per cent swing, but kept Rochdale despite the "Bigotgate" incident. Labour clung on in the marginal seats of Bolton North East, Telford, Gedling (represented by Schools minister Vernon Coaker) and Tooting (represented by Transport minister Sadiq Khan) which were all key Conservative targets. Labour also fought off a strong Liberal Democrat challenge in the City of Durham.
David Blunkett, the former Home Secretary, described the early results as "grim". He said: "The big swings we're seeing to the Conservatives – particularly in marginal seats – bodes ill."
Alastair Campbell, Tony Blair's former press secretary, accused the media of pursuing a "sustained character assassination" of Mr Brown, while giving David Cameron an easy ride. "In my opinion, having followed many elections through the years, the media in his campaign has been very, very biased against Gordon Brown," he said.
There was also frustration in Labour ranks last night that the party had not been able to turn the campaign spotlight on policy differences with the Conservatives – and an acknowledgement that Mr Brown had struggled to make his voice heard until the last few days before polling.
Labour strategists blamed their failure to break through on the impact of the television debates, in which Mr Clegg and Mr Cameron were widely seen to have outshone the Prime Minister. One said: "It's been a difficult campaign for us because it has been so driven by the debates and so driven by what the polls have been saying."
Labour believed it made some progress in shoring up its support in the final days of campaigning.
Sources said accusations that the Tories were going to cut child tax credits helped to win back younger female voters, while the focus on Liberal Democrat immigration and defence policies succeeded in squeezing support for Mr Clegg's party.
Brown allies insist that he should be given considerable credit for withstanding the relentless criticism, and plotting within Labour ranks, over the past year.
"Six months ago people were talking of a Tory majority in the hundreds. The fact that we're going into election day not really knowing the result is extraordinary," a colleague said last night.