He will be replaced by May, the outgoing home secretary who became Conservative leader on Monday after her sole contender for the job - Andrea Leadsom - dropped out of the race.

The former energy secretary in Cameron's cabinet won acclaim for her punchy defence of the European Union in television debates during the referendum debate.

"The number one challenge is to stabilize the economy, send signals of confidence about the future, the plans we have for the future, to the markets, to businesses, to global investors", Hammond told Sky News. "And I know because we're Great Britain we will rise to the challenge".

Cameron also made a reference to his successor, United Kingdom home secretary Theresa May, in his final speech, saying he wished her well and was proud that for the "second time in British history" the Prime Minister will be a woman and "once again a Conservative" in reference to Margaret Thatcher as the first female PM of Britain.

"When it comes to opportunity we won't entrench the advantages of the fortunate few". We (Conservatives) got on with it: we've had resignation, nomination, competition and coronation.

The shoes of Britain's Home Secretary Theresa May as she walks past Larry the Downing Street cat as she arrives to attend a cabinet meeting at 10 Downing Street, in London, Tuesday, July 12, 2016. The newly created post is also known as the Brexit secretary. The blond, Latin-speaking Johnson - a leader of the campaign for a British exit, or Brexit - had aspired to be prime minister himself before his bid failed because of party infighting.

Although she favoured Britain remaining in Europe, May has repeatedly declared that "Brexit means Brexit" and that there can be no attempt to reverse the referendum outcome.

In her first comments as PM outside her new home at 10 Downing Street, Mrs May gave no indication how she would handle Brexit negotiations but instead portrayed herself as a unifying "One Nation" Conservative able to listen to "all of our citizens - every one of us - whoever we are and wherever we're from".

But David Cameron had the last laugh, literally, on Wednesday during his last Prime Minister's Questions (PMQs) time in the British Parliament.

She arrived at the palace by ministerial vehicle with her husband Philip May, having set off from the House of Commons after Cameron was officially accepted by the Queen.

New British Prime Minister Theresa May says she plans to lead in the spirit of unity and build a country that "works for everyone".

The steely vicar's daughter faces a daunting challenge in trying to negotiate an amicable divorce from the European Union following the shock vote for Brexit on June 23.

Johnson led the Brexit camp to victory, antagonising many European Union leaders in the process, but dismayed supporters by backing out of the race to succeed Cameron at the last minute. As May spoke in front of her new residence, a small band of pro-Brexit demonstrators down the street chanted "Theresa May, don't delay!"

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. "I think she's a cautious person, and the British political establishment needs to come to terms with this massive decision".

Trying to reclaim his legacy from his Brexit miscalculation, Cameron said his government had cut the deficit, overseen economic growth and legalized same-sex marriage. But today the country is much stronger; our economy is immeasurably stronger.For me politics has always been about public service in the national interest.

Earlier Wednesday, Cameron appeared to be in a jovial mood as he told members of Parliament: "I have addressed 5,500 questions from this dispatch box - I'll leave it to others to decide how many I've answered".

"I will miss the roar of the crowd".

He bowed out with a poignant line that he used a decade ago against former Labour prime minister Tony Blair.

"Nothing is really impossible if you put your mind to it", Cameron said.