Senior Labour politicians led tributes to Gordon Brown and voiced pride in the party's achievements in 13 years in power.
Former Home Secretary David Blunkett said: "This is a sad moment and one in which to spare a thought for Sarah and the two young boys.
"It is now the moment for the Labour Party to reflect on what has happened - but, far more importantly, what the future holds.
"There can be few tasks in life as thankless as being Prime Minister. This is true in spades when dealing with a global recession in which everywhere else in the world is affected - but your own electorate have no-one else to blame but you.
"That is why everyone, including those who have been vitriolic about Gordon Brown, should have the decency to say 'Thank you' for his tremendous contribution to getting nations to work together over the last two years to combat what would have been a global depression.
"I am deeply proud of what we have achieved in government over the last 13 years.
"I am convinced that we can reconnect with voters and ensure that when the election as is called, as it surely will be within the next two years, we avoid letting people down and ensure that we have the hopes and aspirations of families across Britain firmly in our sights."
Welsh Secretary Peter Hain said: "Like many people, I am naturally disappointed that the Conservatives will form the next Government.
"Whilst the Liberal Democrats are fully entitled to link up with the Tories, I am sorry that they rejected the opportunity for a progressive coalition government to fundamentally change British politics.
"We will be taking our role as the Opposition very seriously, and holding the Conservatives and Lib Dems to account if they fail to deliver what the country needs and working with them where there is common ground.
"I am proud of Labour's many achievements in government. We have transformed public services and public infrastructure and there are two million more jobs in Britain.
"We will be using every opportunity to try to prevent Conservative plans for savage and early cuts in public sector jobs and services."
Irish Premier Brian Cowen described Mr Brown as a very good friend to Ireland throughout his career in Government.
"He showed his commitment to peace in Northern Ireland and to positive British-Irish relations in his extraordinary personal contribution to the talks that led to the Hillsborough agreement earlier this year," the Taoiseach said.
"He has also provided strong and insightful international leadership in the global economic crisis and in the fight against poverty and disease around the world.
"I know that he has always tried, in all he has done, to work for the good of everyone in British society.
"I wish him well for the future and look forward to working with his successor."
Education Secretary Ed Balls - a close ally of Mr Brown since Labour's last period in opposition - told Sky News: "Obviously, 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. It's the end of the Gordon Brown era."
Mr Balls said it was a "disappointment" for Labour that the Liberal Democrats had shown themselves willing to go along with Conservative plans to reduce state spending immediately, rather than maintain it until the recovery is firmly established.
"It is a real issue now," he said. "Will we see cuts in spending immediately?"
Lord Mandelson said of Mr Brown: "He has shown giant dignity and, like of all of us, he may not be faultless but he is certainly fearless."
It was "typical of Gordon to take all the responsibility on to his own shoulders" for Labour's electoral performance at the election, Lord Mandelson said.
"What everyone has to remember in the Labour Party is that we have had a very good, very strong, quite a long innings," he told BBC News.
"And when you have gone through three terms, you know people tend to think it's time for somebody else, it's somebody else's turn, and we were fighting against that.
"Just remember, not so many months ago people were saying that David Cameron was simply going to waltz into Downing Street, that it would be a Tory walkover.
"Well, we gave them quite a fight."Reuse content