Members of St Andrews University in Scotland – where William and Kate first met – burned an effigy of the US president last Friday evening on the town’s East Sands beach.

Matthew Marshall, president of St Andrews Conservative and Unionist Association, apologised for the incident and said that the society would write to Obama to apologise.

He said: “The US and President Obama are important allies of the United Kingdom and, on behalf of the whole association, I apologise unreservedly.

“This is undoubtedly a stupid act and it is deeply regretted by all of us in the St Andrews Conservative Association. I will make sure this never happens again.”

He added that he “thought it would be racist” if they didn’t burn Obama, as he was chosen in a ballot by members.

Authorities at the university investigated the effigy-burning but concluded that it was not an “intentionally racist” action.

Every year, the St Andrews Tories hold a “Heretic Burning”, where effigies of left-wing figures are burned. In the past they have torched an effigy of Nelson Mandela.

A university spokesman said: “This incident, however, has caused very understandable offence and concern to many people, and the university deeply regrets this.

“The burning of any figure in effigy is an act of violence and intolerance and has no place in our modern, international university.”

John Park, Labour MSP for Mid Scotland and Fife said: “This is gravely offensive and way beyond a student prank.”

“Burning an effigy of anyone is offensive, let alone the first black President of the United States. The overtones are deeply unpleasant.”