David Cameron has been given a standing ovation by Tory MPs and a number of Labour MPs after his final Prime Minister's Questions.
The prime minister left the House of Commons chamber with a wave to his wife Samantha and their three children in the public gallery above, after an upbeat half-hour session packed with jokes and tributes.
Cameron denied he would be taking on the recently vacated role of England football manager or Top Gear presenter and insisted he would remain an active parliamentarian from the back benches.
And he professed his love for Larry the No 10 cat – who will stay in Downing Street as a pet of the staff – amid reports that Cameron didn't ever really like him much.
Cameron was then driven back to No 10 for lunch and meetings before he goes to Buckingham Palace later on Wednesday to tender his resignation to the Queen.
Home secretary Theresa May will become prime minister later after her own visit to the palace and is expected to name a number of senior cabinet ministers by the end of the day.
The Commons chamber was packed for Cameron's final PMQs session at midday, with both the public and press galleries overflowing. Muse frontman Matt Bellamy made a surprise appearance, sitting at the back of the chamber near the entrance.
Looking back at his legacy as PM, Cameron said he had answered 5,500 questions during his six years in office but added: "I'll leave it to others to work out how many I've answered."
He said he had also made a record 92 hours of statements from the despatch box as well as "some very enjoyable Liaison Committee appearances".
Labour leader Jeremy Corbyn praised Cameron for his work in releasing Shaker Aamer from Guantanamo Bay and bringing in equal marriage. He wished the outgoing PM and his family well in their future outside No 10.
And he asked Cameron to pass on his thanks to his mother for "her advice about ties and suits and songs" – after the PM told him in February to "put on a proper suit, do up your tie and sing the national anthem".
Wearing a navy suit and red tie, Corbyn said: "It's extremely kind of her and I'd be grateful if you could pass that on to her personally. I'm reflecting on the lesson she offered."
Cameron replied: "I will certainly send his good wishes back to my mother. He seems to have taken her advice and is looking absolutely splendid today."
But he couldn't resist making a jibe at Labour's leadership crisis, as Corbyn prepared for a challenge from Angela Eagle and Owen Smith for the top job.
"I'm beginning to admire his tenacity," Cameron said. "He's 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."
Later the PM read out an email from September 2015 from a woman called Judith.
He said it read: "Please, please keep dignity and not triumphalism during the first PMQs today with Jeremy Corbyn... Because [deputy Labour leader] Tom Watson, who may oust Jeremy Corbyn, is a very different kettle of fish.
"He's experienced, organised and far more dangerous in the long-term... So sensible, sober, polite answers to Mr Corbyn – let him create his party disunity."
To cheers from the Tory benches, Cameron added: "After this is over, I've got to find Judith and find out what on earth happens next!"
Pointing to both parties' records on women, Cameron said: "When it comes to women prime ministers, I'm very pleased to be able to say pretty soon it's going to be two-nil – and not a pink bus in sight."
Former Labour deputy leader Harriet Harman, who launched the pink bus campaign, smiled at the joke from the back benches. The PM also had a pop at Labour over the speed of its leadership contest.
"We got on with it," he said. "We've had resignation, nomination, competition and coronation. They haven't even decided what the rules are yet. If they ever got into power it'd take them about a year to work out who would sit where."
Corbyn replied: "Democracy is an exciting and splendid thing, and I'm enjoying every moment of it." That drew more cheers from the Tory benches than the Labour side.
Ulster Unionist MP Danny Kinahan suggested that Cameron might like to look at a change of career, perhaps as England manager following the resignation of Roy Hodgson or Top Gear host after Chris Evans quit. But Cameron said they "sound even harder" than being PM.
Corbyn asked Cameron whether he fancied becoming the new Strictly Come Dancing judge now Len Goodman has resigned. "I don't really have a pasa doble so no, I can promise that's not the case," Cameron said.
Finally Cameron wanted to put one vicious rumour to rest. He told Corbyn: "You'll appreciate this because El Gato, your cat, is particularly famous.
"The rumour that I somehow don't love Larry – I do and I have photographic evidence to prove it."
Holding up a photo of himself with Larry – which was tweeted at the same time from his official account – he added: "Sadly I can't take Larry with me, he belongs to the house and the staff love him very much - as do I."
Here are Cameron's final words to the House of Commons:
I will watch these exchanges from the back benches, 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 minister at this despatch box or indeed just willing on the front bench 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.
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. Nothing is really impossible if you put your mind to it. After all, as I once said, I was the future once.
With that, he sat down as MPs including Corbyn burst into applause. All Tory MPs rose to their feet and after a while, a few Labour MPs also stood up.
Among them were backbenchers Chris Evans, Steve Pound, David Lammy, Margaret Hodge and Tristram Hunt. The only Labour frontbencher to stand up was shadow home secretary Andy Burnham.
Emily Ashton is a senior political correspondent for BuzzFeed News and is based in London.
Contact Emily Ashton at email@example.com.
Got a confidential tip? Submit it here.