The actor Viggo Mortensen has apologised after he used an offensive racial slur while promoting his new film Green Book, saying "I will not utter it again."

The Oscar-nominated star was appearing in a panel discussion alongside his co-star Mahershala Ali and director Peter Farrelly when he used the 'N-word'.

Mortensen apologised for using the word in a statement to The Hollywood Reporter which read: "In making the point that many people casually used the 'N' word at the time in which the movie’s story takes place, in 1962, I used the full word.

"Although my intention was to speak strongly against racism, I have no right to even imagine the hurt that is caused by hearing that word in any context, especially from a white man. I do not use the word in private or in public. I am very sorry that I did use the full word last night, and will not utter it again."

He added: "One of the reasons I accepted the challenge of working on Peter Farrelly’s movie Green Book was to expose ignorance and prejudice in the hope that our movie’s story might help in some way to change people’s views and feelings regarding racial issues. It is a beautiful, profound movie story that I am very proud to be a part of."

Viggo Mortensen and Mahershala Ali in Green Book

In the film, Mortensen's character is hired to drive an African American pianist played by Mahershala Ali on a concert tour in the American south in 1962.

Ali, who won the best supporting actor Oscar last year for Moonlight, accepted Mortensen's apology while acknowledging that his use of the word was "hurtful".

He said: "However well-intended or intellectual the conversation may have been, it wasn’t appropriate for Viggo to say the n-word. He has made it clear to me that he’s aware of this, and apologized profusely immediately following the Q&A with Elvis Mitchell.

"Knowing his intention was to express that removing the n-word from your vocabulary doesn’t necessarily disqualify a person as a racist or participating in actions or thoughts that are bigoted, I can accept and embrace his apology."

Mahershala Ali accepts co-star Viggo Mortensen's apology while saying the use of the word was "hurtful"

"An excellent and poignant thought was unfortunately overshadowed by voicing the word in its fullness. Which for me, is always hurtful. The use of the word within the black community has long been debated, and its usage should continue to be examined within the black community", he continued.

"The use of the word by those who aren’t black, is not up for debate. The history of discrimination, slavery, pain, oppression and violence that the word has come to symbolize only causes harm to members of the black community and therefore needs to be left in the past."