A Danish youth party was forced to apologise for performing a song that mocked US President Barack Obama and called him a "n**** without talent". Following criticism of the performance which was held at a political event, the party explained that the lyrics were "an attempt to be humorous".

Members of Dansk Folkepartis Ungdom (DFU), the youth arm of the right wing Danish People's Party (DF) performed the song set to the tune of California Dreamin by the Mamas and the Papas, at the annual People's Meeting (Folkemødet), held in Bornholm.

The production was performed in front of the US ambassador to Denmark, Rufus Gifford – who happens to be a friend of Obama's. A photo of the lyrics was soon posted online by political commentator David Trads who asked that DFU to apologise for their "idiotic behaviour".

NÅR TOSSER EFTERABER DERES IDOLERFor et par uger siden insisterede Søren Espersen på, at Barack Obama er den første '...

Posted by David Trads on Sunday, June 19, 2016

"I hope the Danish People's Party leaders will publicly apologize for its youth party's misplaced and idiotic behaviour in front of Obama's friend and official representative but it is probably too much to ask. Unfortunately," Trads wrote on Facebook.

The song also supported Donald Trump's run for president while calling Hillary Clinton a "donkey".

Rufus Gifford
The performance was held in front of US ambassador to Denmark Rufus Gifford REUTERS/Simon Laessoee/Scanpix Denmark

"It wasn't the intention to hurt or insult the American ambassador, Obama's friend for many years, and I bitterly regret that we used that terminology in what was meant as a funny reference but was misunderstood and did more harm than good," DFU National Chairman Lucas Hultgren said in a statement of apology, adding that he has "the utmost respect" for both Gifford and Obama.

Gavin Sundwall, a spokesman for the US embassy in Copenhagen, told The Local that the embassy would not look further into the issue.

"The DF Ungdom apologised and realised that the term they used is very offensive to many Americans. We accept their apology and hope that they refrain from using offensive terms in the future," he said.

Orlando shooting
The song insulting Obama was performed in front of Rufus Gifford, US ambassador to Denmark. Alex Wong/ Getty Images

This is not the first time the DU has faced a backlash for its racist comments. Previously, the party's first veteran, DFer Søren Espersen, responded to criticism of one of their posters which showed an all-white family with the words "Our Denmark - there is so much we need to take care of" written below. He mentioned that he was "colour-blind" in regards to race and that it would have made no difference if there was a "neger on the campaign". The Scandinavian translation for "neger" is negro but many associated it more with a more offensive word.

Espersen later had to defend his usage of the term and stated that he would adopt it to describe Obama as well.