David Cameron has admitted he might need to mug up on British history after being embarrassed by an impromptu quiz on the Letterman show in the US.
Quizzed on the Late Show, the Eton and Oxford-educated Prime Minister could not explain the meaning of the Magna Carta and did not know who composed Rule Britannia.
Remarking on his errors during the interview to host David Letterman, Mr Cameron joked: "That is bad. I have ended my career on your show tonight."
Asked how he rated his performance on arriving in Brazil on Thursday, he added: "I'm a history obsessive, so I'm sorry I didn't do better.
"I think, when I get home and do my children's homework, maybe I need to sit down and do a little bit extra myself."
The PM was welcomed onto what is one of America's most watched chat shows on Wednesday night to the tune of the house band playing Rule Britannia and dry ice pumping into the studio to replicate London fog.
Tony Blair has been on the CBS show twice since leaving office and Mayor of London Boris Johnson appeared recently, but Mr Cameron is the first serving British PM to take part.
After a brief discussion of issues surrounding Syria and the Arab Spring - the subject of his speech to the United Nations earlier in the day - Letterman confronted the PM with a truly tough question - who wrote Rule Britannia?
A flummoxed Mr Cameron made a guess at Edward Elgar, only to learn from Letterman's researchers that it was in fact the little-known Thomas Arne, setting words by James Thomson to music.
He was also at a loss for an answer when asked for the English translation of Magna Carta - Great Charter - and hesitated a while before naming Runnymede as the location of its signing.
But he immediately named 1215 as the date it was drawn up and was able to give an account of its importance in the birth of democracy.
Letterman also questioned the PM about the four nations of the UK, asking: "What is the deal on Wales? Did they vote for you, the people of Wales?" "Some of them did," replied Mr Cameron.
The PM raised applause from the audience when he hailed London's successful hosting of the Olympics and Paralympics this summer.
But, after being teased about his privileged background and public school accent, he admitted he was "not very popular at the moment" - blaming his low ratings on the austerity drive.
Mr Cameron had to correct Letterman when he talked about "the British empire" - "it's not an empire, it's the United Kingdom," he interrupted - and when the host suggested Northern Ireland was "part of England".
He also prompted the studio audience to laugh by joking about Britain's historic relations with the US.
"There were some good bits and some less than good bits, and obviously we had a bit of a falling out," he said. "I like to think we've got over that now."
Stressing his determination to forge good relations with whoever wins the US election, he added: "I have got on well with Republicans, I can get on well with Democrats."
The loudest applause of the 15-minute interview came when he said Britain does not allow political advertising on TV - a major issue in the US, as both Mitt Romney and Barack Obama have spent lavishly on "attack ads".
He also revealed that it was thanks to TV that he was first recognised in the US, when he was walking in New York and a passer-by shouted: "Hey! Prime Minister's Questions! We love your show!"
It is understood that Mr Cameron's team approached the Late Show to let them know he would be available during his visit to the UN.
The long-running programme has a daily audience of around three million but Letterman is known for off-the-wall questions, making the offer a slight risk.
A government source said: "It is just a good opportunity. Britain has had an extraordinary year with the Jubilee, with the Olympics and the Paralympics. We have got something good to shout about.
"So getting out there, talking up Britain is important. We should never forget that we are the biggest investor in America, America is the biggest investor in us."