Kiran Stacey followed events as they happened:
4.15pm: We start this live blog with the news that the Evening Standard is reporting that Gordon Brown will quit tonight after talks between Labour and the Lib Dems fell apart earlier today. There has been a growing feeling today that the talks were unlikely to go anywhere, not least because of the number of Labour MPs and former MPs coming out against them.
5.47pm: Sky is now following the Evening Standard in saying that Gordon Brown will go tonight. There had been some suggestion that he might leave it until tomorrow, but Sky is now convinced otherwise.
6.05pm: We are hearing that Gordon Brown is sitting in Downing Street waiting to resign. He’s waiting for the nod from David Cameron that he can form a government. Cameron is waiting in turn for the nod from the Lib Dems. So once more, all eyes on Nick Clegg and his party.
7.11pm: The lectern is outside Number 10. A statement is expected shortly.
7.16pm: Brown’s staff are coming out of Number 11.
7.17pm: [Announcement of resignation.] Brown is out. Says he said he would do all he could to ensure a strong stable and principled govt was formed.
7.19pm: His resignation as Labour leader takes effect immediately. He has thanked British troops, now he is thanking Sarah and his sons.
7.19pm: Brown says he loved the job not for its title and glory but for its potential to do good.
7.21pm: The four family members are holding hands as they climb into the car to take them to Buckingham Palace to let the Queen know he is stepping down.
7.42pm: Brown is now leaving the Palace. That didn’t take long.
7.48pm: Poor old Gordon got caught in the traffic as he left Buckingham Palace. No outriders to clear the roads, as he’s no longer PM.
8.04pm: David Cameron is on his way to see the Queen. We still don’t know what kind of administration he will lead, which seems like a strange way round.
8.08pm: David and Samantha Cameron have arrived at the palace and gone in to see the Queen.
8.31pm: Cameron has been in with the queen for over 20 minutes now. I wonder what they are talking about.
8.33pm: Steve Hilton, Andy Coulson and other Cameron aides are gathered outside Number 10, grinning and waiting to get in. Meanwhile Cameron has left the palace. Unlike when he arrived, and unlike when Brown left, he has a police motorcade.
8.43pm: Cameron arrived at Number 10. He is walking very slowly, soaking it all up.
8.46pm: Cameron walks very slowly into Number 10 to the applause of staff. He gave a brief speech outside, which was a curious mix up uplifting and downbeat messages. He has given no indication of what his government might look like, but did mention Nick Clegg in his speech, almost referring to him as a co-leader.
8.46pm: Cameron: “This is going to be hard and difficult work.”
9.27pm: Sky is reporting these cabinet appointments: Vincent Cable will be chief secretary to the Treasury, David Laws will be education secretary, Andrew Lansley will be health secretary and William Hague will be foreign secretary. The BBC says Nick Clegg will be deputy prime minister.
10.03pm: Prime Minister - David Cameron
Secretary of State for Defence - Liam Fox
Deputy Prime Minister - Nick Clegg
Chancellor of the Exchequer - George Osborne
Chief Secretary to the Treasury - Vince Cable
Foreign Secretary - William Hague
Secretary of State for Children, Schools and Families - David Laws
Secretary of State for Work and Pensions - Philip Hammond (unconfirmed)
Secretary of State for Health - Andrew Lansley
10.38pm: Nick Clegg will be deputy PM, says Associated Press. They say they have it confirmed by the Tories. Sky reports five cabinet positions for the Lib Dems [in the Cameron cabinet].