David Cameron has been given a standing ovation by Conservative MPs after his final Prime Minister’s Questions.
The prime minister, who will go to Buckingham Palace later to tender his resignation to the Queen, told MPs he would “miss the roar of the crowd”.
Defending his achievements in office, he said there had been many “amazing moments” during his six years in power.
Home Secretary Theresa May is preparing to succeed Mr Cameron later after her own audience with the Queen.
After taking office, Mrs May will set about naming her own frontbench team.
Conservative MPs rose as one to applaud David Cameron at the end of his 182nd session as prime minister, with Labour MPs also joining in with the clapping, including Jeremy Corbyn.
Mr Cameron told then that he intended to stay in public life and would be “willing them on”, saying “nothing is impossible”.
In his final remarks, he reprised a remark he made to Tony Blair during his first ever PMQs as opposition leader in 2005. saying: “I was the future once”.
During a generally light-hearted and jocular session of Prime Minister’s Questions, Mr Cameron said he had clocked up 5,500 questions at the despatch box, joking that he would leave it to others to decide how many he has answered.
He dismissed suggestions he will look to take over as the host of Top Gear or England manager, joking they “sound even harder” than being PM.
He also stressed his love for Larry the Downing Street cat – amid rumours that he was not a fan – and swapped warm wishes with Jeremy Corbyn, saying he had almost come to admire the Labour leader’s “tenacity” in hanging on to his job.
Defending his economic, social and foreign affairs legacy, Mr Cameron said there had been “many amazing moments” over the past six years of “public service in the national interest”.
Mr Cameron “warmly congratulated” Theresa May, who sat next to him during the session, on her election and told Labour leader Jeremy Corbyn that “when it came to female prime ministers I am glad to say the score will soon be two-nil”.
Mr Corbyn said that although he had often disagreed with the PM, he thanked him for his service over the last six years and praised him for his backing for equal marriage and his efforts to secure the release of Shaker Aamer from Guantanamo Bay.
The Labour leader also paid tribute to Mr Cameron’s wife Samantha and his family, who watched the proceedings from the public gallery. His daughters Nancy and Florence were seen to give their father a wave and cheer him on during the session.
Earlier, Mr Cameron told the Telegraph he came into Downing Street to “lead people through difficult decisions so together we could reach better times”, adding “as I leave today, I hope people will see a stronger country, a thriving economy, and more chances to get on in life.”
Later, after saying goodbye to staff at Downing Street, the PM will tender his resignation to the Queen.
The private audience with the Queen was likely to be a short one, potentially about twenty minutes.
Soon after, Mrs May will then make her own way to Buckingham Palace, accompanied by her husband Philip, when she will be asked to accept the monarch’s offer to form a new government.
Queen Elizabeth was likely to ask the new PM, who will be the 13th leader of her reign, about her “intentions and programme” for government.
Mrs May will then return to No 10 as the country’s second female prime minister, following in the footsteps of Margaret Thatcher.
She is expected to briefly address the nation before meeting top officials, including Cabinet Secretary Sir Jeremy Heyward, and receiving a full national security and defence briefing.
She will be asked to hand-write letters to the commanders of the UK’s four Trident submarines about what to do in the event of a catastrophic nuclear attack on the UK and to appoint two nuclear “deputies” – ministers who will take decisions on the deterrent if she has been rendered incapable.
She is also expected to take calls from a number of foreign leaders. Later on Wednesday, she will get down to the work of putting together her government – with key appointments set to be announced within hours.