Ronald Reagan's family has hit out at the producers of a new Hollywood film for allegedly portraying the former President as a racist.

The Republican icon is played by British actor Alan Rickman in The Butler, which tells the story of a black man who served in the White House for 34 years.

However, his son claims that the portrayal implies that Reagan was prejudiced against black people, when in fact he helped the cause of African-Americans and showed friendship to the real White House butler.

Scroll down for video

Controversy: Jane Fonda and Alan Rickman playing Nancy and Ronald Reagan in The Butler, which allegedly portrays the former President as a racist

Real life: The President was in fact friendly towards White House butler Eugene Allen and many other African-Americans, according to his son Michael

The film, which was released in the U.S. two weeks ago, follows Cecil Gaines, played by Forest Whitaker, as he experiences decades of American history at the side of multiple Presidents.

It is based on the real-life story of Eugene Allen, who died in 2010 and served every President from Eisenhower to Reagan.

Blockbuster: The Butler, starring Forest Whitaker and Oprah Winfrey, covers decades of American history

The President's son Michael has launched a blistering attack on his father's portrayal, writing in Newsmax that the film should be called 'The Butler from Another Planet' because it is so historically inaccurate.

'Portraying Ronald Reagan as a racist because he was in favor of lifting economic sanctions against South Africa is simplistic and dishonest,' he wrote.

'If you knew my father, you'd know he was the last person on Earth you would call a racist.'

He pointed out that the leader had a record of friendship towards black people, having been close to a number of African-Americans during his college days.

When Reagan was governor of California, his son wrote, he more than doubled the number of black officials who had ever been appointed in the state's history.

Attack: Michael Reagan, pictured speaking at his father's funeral, is furious about the President's portrayal

Michael Reagan claimed that his parents 'treated Mr Allen with the utmost respect' - unlike in the film, where Cecil Gaines's invitation to the state dinner is implied to have been an act of tokenism.

When Allen was interviewed about his experiences in 2008, his only reminiscence of the evening was to smile as his wife recalled, 'Had champagne that night.'

The film culminated with the butler's resignation as a protest over Reagan's opposition to South African sanctions, though there is no evidence that this was the reason for Allen's retirement at the age of 67.

'The real story of the White House butler doesn’t imply racism at all,' Michael Reagan wrote. 'It's simply Hollywood liberals wanting to believe something about my father that was never there.'

He added: 'My father's position on lifting the South African sanctions in the 80s had nothing to do with the narrow issue of race. It had to do with the geopolitics of the Cold War.'

Allen told his interviewer in 2008 that he was 'especially fond of the Reagans', and resolutely refused to criticise any of the Presidents he worked for.

The Butler, directed by Lee Daniels, takes a number of liberties in adapting Allen's life story, most notably in inventing an episode in which his mother is raped and father killed by a plantation boss.