The two leaders showed off their skills with the paint brush at a visit to a local school near the G8 summit in Lough Erne, Northern Ireland.
Asked to help complete a giant mural at Enniskillen Integrated Primary School, they quickly turned the request into a competition.
“Do you think you can handle this David?,” the US President joked as he pointed the Prime Minister towards a section to paint.
Mr Obama was soon admitting he was in trouble for “going outside the lines”- securing an assurance from pupils that he would not be punished.
But it was Mr Cameron who received praise from the teacher - and three cheers from the pupils - for finishing his section first and not straying beyond the boundaries in his work.
“I didn`t realise David was going to move so fast,” Mr Obama joked.
But he refused to admit defeat, insisting: “I`m not as good as these guys but I`m better than David.”
The President chose to colour in with blue paint the initial `E` of Enniskillen on the giant artwork spread across several tables while the Prime Minister took on the second `n`.
Within seconds, Mr Obama admitted: “I think I`ve gone outside the lines.”
“I was asking if I was going to be punished,” he told one of the teachers, “but they gave me a pass”.
“I should have been an artist, instead I got sidetracked into politics,” he mused.
More about: