Cameron exits with a joke, a number of them
Cameron said of beleaguered Opposition leader Jeremy Corbyn: 'I'm beginning to admire his tenacity. He's been kicked so many times but he says 'Keep going, it's only a flesh wound'. I admire that.' He left to a part-standing ovation. Photograph: (Reuters)
"This morning I had meetings with ministerial colleagues and others. Other than one meeting this afternoon with Her Majesty the Queen, the diary for the rest of my day is remarkably light," Cameron said to roars of laughter in a packed House of Commons.
He was due to present his resignation to the queen at Buckingham Palace at around 1600 GMT. Then May will pay her own visit to the monarch to be formally entrusted with the job, before entering 10 Downing Street to become Britain's second woman prime minister after Margaret Thatcher.
Cameron stepped down after Britons rejected his entreaties and voted in a June 23 referendum to quit the EU, weakening the 28-nation bloc and creating huge economic uncertainty because of the likely damage to trade and investment.
Apart from the task of executing 'Brexit', May must try to unite a divided party and a nation in which many, on the evidence of the vote, feel angry with the political elite and left behind by the forces of globalisation.
Despite the serious backdrop, there was an atmosphere of hilarity in parliament as Cameron traded humorous jabs with beleaguered opposition Labour leader Jeremy Corbyn.
"I'm beginning to admire his tenacity. He is reminding me of the black knight in Monty Python's Holy Grail. He's been kicked so many times but he says 'Keep going, it's only a flesh wound'. I admire that," said Cameron, who departed to a standing ovation from his own and some Labour members of parliament.
He took the opportunity to trumpet his government's achievements in generating one of the fastest growth rates among western economies, chopping the budget deficit, creating 2.5 million jobs and legalising gay marriage.
Yet his legacy will be overshadowed by his failed referendum gamble, which he had hoped would keep Britain at the heart of a reformed EU.
'Our Angela Merkel'
May, who has been interior minister for six years, is seen by her supporters as a safe pair of hands to steer the country through the disruptive Brexit process.
"I think around the cabinet table yesterday the feeling was that we have our Angela Merkel," said Jeremy Hunt, health secretary in Cameron's team which met for the last time on Tuesday.
"We have an incredibly tough, shrewd, determined and principled person to lead those (Brexit) negotiations for Britain," Hunt told Sky News television.
German Chancellor Merkel will be May's most important counterpart on the continent as the Brexit process unfolds. Both women are renowned for their firmness, pragmatism and discipline.
The new British leader is expected to immediately start putting together a new cabinet, a complex political balancing act in which she will try to satisfy opposing camps in her party.
Before the referendum, May had campaigned for Britain to remain in the EU, albeit in a low-key fashion. Since the vote, she has repeatedly said that "Brexit means Brexit" and her backers say she is determined to make the exit a success.
"Of course Theresa is going to want to make sure she's got a balanced ticket that represents the views of different parts of the party," cabinet minister Chris Grayling, who campaigned for Brexit and managed May's leadership campaign, told BBC radio.
May has said she plans to set up a new government department to lead the process of quitting the EU which would be headed by someone who had campaigned for Brexit.
"That's very sensible. It will ensure confidence among those in the party who did campaign to leave that they have a champion who believes in what they campaigned for," Grayling said.
Financial markets, which had been extremely volatile since the referendum, reacted positively to news on Monday that May would become prime minister earlier than expected, with sterling making strong gains against the dollar and the euro.
The UK currency, which sank to a 31-year low against the dollar a week ago, rebounded further on Wednesday as the political uncertainty that has dogged it since the referendum eased.
Stock markets traded within sight of their highest levels of the year as the prospect of stimulative economic policy across the developed world eased immediate concerns over the impact of the Brexit vote.
'Reluctant to shift'
Despite pressure from other EU capitals to quickly start negotiating the terms of Britain's exit, May has said she would not be rushed into it.
She is unlikely to trigger Article 50 of the EU's Lisbon Treaty - which will formally launch the process of separation and start the clock ticking on a two-year countdown to Britain's actual departure - until next year.
She is expected to promote women ministers to several senior roles, and Cameron's long-serving finance minister George Osborne could lose his job, according to media reports.
Vince Cable, an opposition Liberal Democrat politician who was the minister for business in a coalition government led by the Conservatives from 2010 to 2015, praised May's determination but said she may face challenges in the role of prime minister, which has a much wider remit than her home affairs portfolio.
"There is a streak that we all saw which was to be really quite narrow in focus and reluctant to shift even when the facts seemed to be changing, and if that's what happens when she's prime minister we could find ourselves in difficulties," Cable told BBC television.
May could face more trouble from dissenting Conservatives than from the Labour Party, which is in meltdown.
After months of simmering discontent among Labour lawmakers with party leader Corbyn, the conflict exploded into the open after the referendum when the vast majority of the lawmakers rejected his leadership, accusing him of failing to campaign vigorously enough for a Remain vote.
Corbyn has clung to his job, citing support from the party grassroots members, and the 116-year-old party is now locked in a bitter power tussle that risks destroying it.
Former minister Angela Eagle launched a leadership bid against him on Monday, and on Wednesday fellow Labour lawmaker Owen Smith also threw his hat in the ring.