- Cameron served as UK PM from 2010 to 2016
- Having failed to convince Britons to vote remain in the EU, he quit in June
- The Conservative politician's exit sparked a brief leadership crisis
- Theresa May, 49, is now set to become the country's second female leader
David Cameron, the ougoing British prime minister, has made his final remarks as leader saying that the job was the "greatest honour of his life".
As he left Downing Street on Wednesday to tender his resignation to Queen Elizabeth II, he said: "It's not been an easy journey and of course we've not got every decision right, but I do believe that our country is much stronger. Above all it was about turning around the economy."
Earlier in the day, he made his final appearance in parliament as Britain's leader, turning the normally raucous prime minister's questions session into a time for praise, thanks, gentle ribbing and cheers.
Prime Minister's Questions, a weekly session, culminated in a standing ovation for the 49-year old, who is leaving office after voters rejected his advice and decided to leave the European Union.
By the end of Wednesday, he is expected to have handed over the reins of power to his successor, Theresa May.
"I will miss the roar of the crowd. I will miss the barbs of the opposition," Cameron said in parliament, promising to watch future exchanges as a regular Conservative Party politician on the back benches.
Cameron also poked fun at the leadership turmoil going on in the Labour Party, telling opposition leader Jeremy Corbyn that the Tories have had "resignation, nomination, competition and coronation" while Labour is still working out its leadership rules.
Al Jazeera's Barnaby Phillips, reporting from London, said that May was disadvantaged because she did not have much time to form her cabinet, details of which are expected to start emerging on Wednesday evening.
"The process has been truncated," our correspondent said. As soon as she becomes prime minister, May will learn the details of Britain's nuclear deterrant and receive phone calls from fellow world leaders.
"Those phone calls from [German Chancellor Angela] Merkel and [French President Francois] Hollande will be very interesting in context of the looming Brexit - a British exit from the EU."
Larry the cat
At his final Prime Minister's Questions, Cameron also took a moment to discuss the Downing Street cat, Larry, who is being left behind to keep working as the resident mouse-catcher. Cameron said he wanted to scotch "the rumour that somehow I don't love Larry. I do!"
After Cameron formally resigns, 59-year-old May will visit the palace, where the Queen will ask her to form a new government.
The new leader, Britain's Home Secretary - in charge of immigration and law and order - for the past six years, has the tough task of calming the country, and the financial markets, after the massive upheaval that has followed the June 23 referendum.
May's new cabinet is expected to include a minister in charge of implementing Brexit.
May, who backed remaining in the EU, will also be expected to reward prominent campaigners for a "leave" vote with key jobs.
Observers are keen to see if she appoints former London Mayor Boris Johnson and Justice Secretary Michael Gove, one-time Conservative leadership contenders who jointly headed the "leave" campaign before Gove turned on Johnson.
There is also speculation that May, Britain's second female prime minister - after Margaret Thatcher - will boost the number of women in top posts.
"My advice to my successor, who is a brilliant negotiator, is that we should try to be as close to the European Union as we can be for the benefits of trade, cooperation and of security," Cameron told parliament. "The Channel will not get any wider once we leave the European Union, and that is the relationship we should seek."
Cameron told The Telegraph it had been "a privilege to serve the country I love".
He said he hoped he was leaving "a stronger country, a thriving economy and more chances to get on in life".
Newspapers offered harsher judgments of a politician toppled by his decision to call a referendum on EU membership - which he then lost.
The Sun said Cameron had been "undone by his Olympian overconfidence", while The Guardian called him a "prime minister of broken promises".
But Cameron drew praise from an old adversary, with European Commission President Jean-Claude Juncker saying he would miss the British leader.
"I have experienced a man who is serious, who is a fan of no-nonsense policy and who was delivering at each and every moment when things started to become serious," Juncker said.
Here is how some on social media reacted to Cameron's last day at work: