Django Unchained is about a bounty hunter who kills slave owners and the N-word is often used in the script.

Adams later issued a statement in which he said attempts to suggest he was a racist were "without credibility".

He said: "I am opposed to racism and have been all my life.

"The fact is that nationalists in the north, including those from Ballymurphy, were treated in much the same way as African Americans until we stood up for ourselves.

"If anyone is genuinely offended by my use of the N-word they misunderstand or misrepresent the context in which it was used. For this reason I deleted the tweets."

Mr Adams said that anyone who had seen the film, which stars Jamie Foxx as the emancipated protagonist, Django, and Christoph Waltz as his ally, and was familiar with the plight of nationalists in the north until recently "would understand the tweet was not meant to insult".

"My tweets about the film and the use of the N-word were ironic and not intended to cause any offence whatsoever," he said.

American Irish writer Michael Brendan Dougherty, who works for The Week magazine, tweeted: “Gerry Adams survived the RUC, the UVF, and British intelligence. This tweet he may not.”

Colum Eastwood, the leader of Northern Ireland's Social Democratic and Labour Party, called on Adams to apologise.

"The Sinn Fein leader’s public use of a racist slur falls well below the standards demanded by us all," he said in a statement.

"Using the language of slave owners is never appropriate and the fact Gerry Adams has yet to apologise only compounds the insult. The tweet shows a staggering deficiency in judgment and he needs to apologise unreservedly.

"For years now Sinn Féin have embarrassingly tried to portray Gerry Adams as some kind of international icon. It was only in March that Gerry Adams was comparing himself to Rosa Parks.

"If a similar remark had been made by any other political leader on this island, Sinn Féin would have unleashed an orchestrated wave of angry condemnation. They would not accept any talk of context or of irony. They should hold themselves to the same standard.

"No-one in Ballymurphy or any other area affected by the Troubles will accept this use of language to refer to events here."