Chancellor Gordon Brown left Downing Street on his way to the Treasury. When he returned he was prime minister.
The world's media gathered outside Number 10 to witness the historic scenes.
A removal van pulled up early in the day to remove the last of Tony Blair's possessions. A treadmill was among the items.
Mr Blair did not make any statement as he emerged from Downing Street ahead of his final prime minister's questions.
One man glad to see an end to the Blair era is John Howson. He was among protesters outside the Downing Street gates.
The chancellor looked on as Mr Blair began his final prime minister's questions in the Commons.
Mr Blair received a standing ovation from both sides of the house before heading back to Downing Street. He was due to visit Buckingham Palace later to resign.
Mr Blair posed for photographs with his family on the steps of Downing Street before leaving for the Palace.
Mr Brown was given a rousing send-off by colleagues at the Treasury before leaving with wife Sarah for his audience with the Queen. She invited him to form a new government.
Mr Blair took the train from King's Cross to his Sedgefield constituency as Gordon Brown emerged from Buckingham Palace as prime minister.
Standing by the steps of Number 10, Mr Brown said he would be strong in purpose, steadfast in will and resolute in action.