Jokes, banter and a standing ovation at David Cameron's final PMQs
David Cameron was given a standing ovation by Conservative MPs as he delivered a farewell speech at Prime Minister's Questions.
Quoting a line from his first PMQs appearance, when he faced Tony Blair as leader of the opposition, his final words were: "I was the future once."
MPs on all sides burst into applause, with Tories and some other MPs getting to their feet, as he departed.
He had earlier joked and bantered with MPs and Labour leader Jeremy Corbyn.
- Rolling text and video coverage as May succeeds Cameron
- 10 key moments from Cameron's time as leader
- 'He was the future once': Cameron's memorable PMQs
The prime minister is handing over to Home Secretary Theresa May - who was sat alongside him on the front bench during the half hour session - after announcing his resignation on 24 June, the day after Britain voted to quit the EU.
Mr Cameron told MPs he had clocked up 5,500 questions during his six years as prime minister, joking that he would leave it to others to decide how many he has answered.
He "warmly congratulated" Mrs May and told Mr Corbyn that "when it came to female prime ministers I am glad to say the score will soon be two-nil".
Mr Corbyn thanked the outgoing PM 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.
He also paid tribute to Mr Cameron's wife Samantha and his family, who watched the proceedings from the public gallery. Mr Cameron's daughters Nancy and Florence were seen to give their father a wave and to cheer him on during the session.
Mr Cameron - who appeared to be enjoying his final appearance at the despatch box - dismissed suggestions he will now look to take over as Top Gear host or England manager, joking they "sound even harder" than being PM - and rejected Mr Corbyn's suggestion that he should take over from Len Goodman as a judge on Strictly Come Dancing.
Mr Cameron said of equal marriage: "I will never forget the day at No 10 when one of the people who works very close to the front door said to me 'I'm not that interested in politics, Mr Cameron, but because of something your lot has done I'm able to marry the person I've loved all my life this weekend'.
"There are many amazing moments in this job but that actually was one of my favourites."
The outgoing PM also stressed his love for Larry the Downing Street cat - amid rumours he was not a fan - even holding up a picture of himself with the feline to prove it.
And he took a good-natured swipe Mr Corbyn, saying he had come to admire the "tenacity" of the Labour leader in hanging on to his job, comparing him to the Black Knight, in Monty Python and the Holy Grail, who kept going despite having his limbs chopped off, insisting it was "only a flesh wound".
Mr Corbyn joined in with the banter, thanking Mr Cameron's mother for her advice - delivered by Mr Cameron at an earlier, less good-humoured PMQs - that he should put on a smart suit and tie.
The Labour leader also issued a defiant message to Labour MPs trying to unseat him, saying: "Democracy is a wonderful thing and I'm enjoying every minute of it!"
He added that there would be "plenty more" questions from him to Mr Cameron's successor.
He also attempted to raise rising homelessness rates, the rights of EU nationals living in the UK and the economy during his exchanges with the PM.
Mr Cameron turned serious as the end of the session approached, telling MPs: "I will watch these exchanges from the backbenches, I will miss the roar of the crowd, I will miss the barbs from the Opposition, but I will be willing you on.
"And when I say willing you on I don't just mean willing on the new prime minster at this despatch box or indeed just willing on the frontbench defending the manifesto that I helped to put together.
"But I mean willing all of you on. Because people come here with huge passion for the issues they care about, they come here with great love for the constituencies that they represent.
"And also willing on this place, because yes we can be pretty tough and test and challenge our leaders, perhaps more than some other countries, but that is something we should be proud of and we should keep at it.
"And I hope you will all keep at it and I will will you on as you do."
Reflecting on the power of politicians to drive through change, Mr Cameron went on: "The last thing I'd say is that you can achieve a lot of things in politics, you can get a lot of things done.
"And that, in the end, the public service, the national interest, that is what it is all about."
Finally, in a nod to a famous exchange he had in 2005 when he told the then prime minister Tony Blair "he was the future once", Mr Cameron said: "Nothing is really impossible if you put your mind to it. After all, as I once said, I was the future once."