The PM made his blunder in the worst possible place in front of the Queen and Archbishop of Canterbury at Buckingham Palace.
He has for months been promoting a major global anti-corruption summit which begins on Thursday in London.
But he was left red-faced after TV cameras picked up his extraordinarily undiplomatic banter during a gathering of MPs for Her Majesty’s 90th birthday.
“We had a very successful cabinet meeting this morning, talking about our anti-corruption summit,” he said. “We have got the Nigerians – actually we have got some leaders of some fantastically corrupt countries coming to Britain.”
Not realising the TV cameras were rolling, the PM blundered on: “Nigeria and Afghanistan – possibly two of the most corrupt countries in the world.”
The Queen did not respond to Mr Cameron’s unguarded comments.
But Archbishop of Canterbury Justin Welby added hastily: “But this particular president is actually not corrupt. He’s trying very hard.”
The PM made his gaffe in the worst place – with Commons Speaker John Bercow, the Queen,
Archbishop of Canterbury and Commons Leader Chris Grayling
Trying to lighten the mood, Commons Speaker John Bercow – who was also there – joked: “They are coming at their own expense, one assumes”.
Mr Cameron laughed and said: “I would… yes!”
He added: “Because it’s an anti corruption summit everything has to be open. There are no closed door sessions, it’s all in front of the press. It could be quite interesting”
President Muhammadu Buhari and Afghan President Ashraf Ghani, both of whom are due to attend the summit, acknowledge corruption in their countries and have pledged to clean it up.
The PM said the countries, not their leaders, were corrupt – but the comments could provoke a diplomatic row.