Ben Affleck persuaded the producers of Finding Your Roots to edit out details of how his ancestors were slave owners even though it was a breach of PBS editorial rules.

The new Batman star, who supports a number of liberal causes, objected to the ancestry TV show airing how his distant relations were racist, leaked Sony emails reveal.

Instead viewers were shown heartwarming stories of how his third grandfather was a mystic in the Civil War and how his sixth grandfather was a patriot who fought in the American Revolution.

Daily Mail Online has reviewed a transcript of the show and watched the video and there is no mention of slavery in the part featuring Affleck.

The Sony emails show that the makers of Finding Your Roots, including Emmy Award-winning host and Harvard professor Henry Louis Gates Jr, engaged in a deliberate cover-up despite knowing that it was a 'violation' of PBS rules, as Gates puts it.

SCROLL DOWN FOR VIDEO

Tree: Ben Affleck with the family tree drawn up for him by the show. It concentrated on his connections to the Freedom Riders through his mom and the Revolution - not slave-owning

Respected: Henry Louis Gates Jr is the face of the PBS documentary and a Harvard academic. He said that to 'censor' the show would be a breach of the publicly-subsidized broadcaster's rules

Superhero: The exchange between Sony executive Michael Lynton (right) and his friend Henry Louis Gates Jr described Affleck as a 'megastar' and that Gates was willing to go to Detroit where he was filming Batman v Superman (left) to convince him not to 'censor' the show

An email from Sony chief executive Michael Lynton to Gates reads: 'I would take it out if no one knows.'

Gates warns that 'once we open the door to censorship, we lose control of the brand' - but appears to have done just that.

The emails raise serious questions over the integrity of Finding Your Roots, the publicly-subsidized broadcaster PBS and Mr Gates, who is the director of the Hutchins Center for African and African American Research at Harvard.

They also call into question the motives of Affleck who is a strong supporter of liberal causes including gay marriage and the anti-hunger campaign 'Feeding America'.

His Eastern Congo initiative advocates for better investment in the African nation and in an interview with Bill Maher he attacked the host for his views on Islam and called him a 'racist'.

Affleck's request was revealed in leaked Sony emails between Mr Gates and My Lynton that were published by WikiLeaks.

The exchange happened in July last year and the second series of Finding Your Roots was shown in September last year.

The two men appear to be friends and Mr Gates seems to be asking for advice on what he calls a 'dilemma'. Sony is not listed in the production credits for the show.

Mr Gates writes: 'Confidentially, for the first time, one of our guests has asked us to edit out something about one of his ancestors--the fact that he owned slaves.

'Now, four or five of our guests this season descend from slave owners, including [documentary filmmaker] Ken Burns.

'We've never had anyone ever try to censor or edit what we found. He's a megastar. What do we do?'

Mr Lynton's advice is 'all things being equal I would definitely take it out' but warns that if such a move becomes public then 'it gets tricky'.

Close: Ben Affleck and his mother Chris Anne in Los Angeles. The show highlighted her past as a Freedom Rider, rather than his slave-owning ancestor

Africa campaigner: Ben Affleck giving evidence to a Senate committee last month in support of his Eastern Congo Initiative

He also says that a big question is who knows about the request, to which Mr Gates replies that all of his producers were aware of the situation.

Mr Gates writes: 'To do this would be a violation of PBS rules, actually, even for Batman [Affleck]'.

Lynton replies: 'Then it is tricky because it may get out that you made the change and it comes down to editorial integrity.'.

Gates says: 'It would embarrass him and compromise our integrity.

'I think he is getting very bad advice. I've offered to fly to Detroit, where he is filming, to talk it through.'

Mr Affleck's request seems all the more inexcusable as other guests in the series found out that their ancestors were slave owners, including Anderson Cooper whose distant relative was beaten to death with a farm hoe by a rebellious slave.

What they saw: This was the document shown to viewers about Affleck's Revolutionary War relative

Dealing: Anderson Cooper filmed as he was told that his ancestor was not only a slave-owner, but one who was killed by a slave with a hoe. The slave was hanged after the killing

Instead of finding out about Mr Affleck's story, in the episode viewers were shown footage that painted him in an entirely positive light.

Mr Affleck told how he traces his social consciousness back to his mother Anne Boldt, a teacher and activist who was a Freedom Rider in the Civil Rights Era.

He says that she taught him: 'The character of a person is defined by adversity, rather than by like when, you know, everything's going well'.

He says: 'She definitely imbued us with a very strong sense of social justice and social equality and kind of things that I've, uh, carried with me, but always using other people as examples, never herself.'

In a humorous moment Affleck is told that he is the 10th cousin of Matt Damon, a good friend of his who comes from Boston, his home town.

Viewers were also shown stories of how his third great grandfather, Almon Bruce French, comforted the bereaved in the Civil War by claiming he was a spiritualist who could see the dead.

Affleck learns that his sixth great grandfather Jesse Stanley fought in the American Revolution and was one of just 2,000 soldiers who served under George Washington in some of the toughest times of the war.

Teaser: Ben Affleck in the movie in a clip from a teaser for its trailer released this week

WHAT PBS SAYS ABOUT INTEGRITY 'The Public Broadcasting Service is committed to serving the public interest by providing content of the highest quality that enriches the marketplace of ideas, unencumbered by commercial imperative. Throughout PBS’s history, four fundamental principles have guided that commitment. Editorial integrity: PBS content should embrace the highest commitment to excellence, professionalism, intellectual honesty and transparency. In its news and information content, accuracy should be the cornerstone. Quality: PBS content should be distinguished by professionalism, thoroughness, and a commitment to experimentation and innovation. Diversity: PBS must be responsive to a diverse public and has a responsibility to explore subjects of significance and the marketplace of ideas. Local station autonomy: Local decision-making ensures topical and relevant content and allows PBS member stations to reflect the communities they serve.' The rules also say: 'Public television is a major participant in the great tradition of a free and independent American press. Therefore, public television must protect its journalistic integrity and it must reinforce the accurate perception that it is a free and independent institution.' Source: PBS Advertisement

Affleck says: 'That is really, really something. I love it. I'm developing this movie about, um, the Revolutionary War. Now, I see why I was drawn to it.'

With warm smiles Affleck tells Mr Gates that these stories 'make me feel more connected to the country...this is a big surprise and I'm really proud of it'.

He also says: 'I'm sure that there's so much of people's history that gets lost over time. You have to really work to hold on to it I suppose.'

The revelations come at a time when television presenters are under scrutiny for the veracity of their claims after NBC host Brian Williams admitted lying on some of his news reports.

Gates is one of the most respected African American filmmakers in America and his PBS documentary ‘The African Americans: Many Rivers to Cross’ won him the Peabody Award, one of the highest awards in journalism, and an NAACP Image Award.

Affleck is the latest celebrity to have embarrassing personal details released by the hacked emails that were stolen from Sony Pictures Entertainment, the company's movie division, last November.

This week WikiLeaks uploaded 30,287 of the documents and 173,132 emails into a database which is the first time the information has been made available in one place in a searchable format.

The emails were stolen by a calling itself Guardians of Peace, though it later emerged that it was the work of North Korea in response to the release of the Sony film: 'The Interview', a parody about the secretive communist nation.

When North Korea threatened to carry out further attacks at screenings Sony cancelled the opening but changed its mind after pressure from the White House.

The film eventually came out on limited release in December and on the Internet at the same time.

A spokesman for Mr Gates claimed that a slave-owning ancestor was not interesting enough for the show.

'Ultimately, I maintain editorial control on all of my projects and, with my producers, decide what will make for the most compelling program,' he said through a spokesman.

'In the case of Mr Affleck - we focused on what we felt were the most interesting aspects of his ancestry - including a Revolutionary War ancestor, a 3rd great–grandfather who was an occult enthusiast, and his mother who marched for Civil Rights during the Freedom Summer of 1964.'

A PBS spokesman claimed the emails showed Gates was taking editorial integrity 'seriously'.

'It is clear from the exchange how seriously Professor Gates takes editorial integrity.

'He has told us that after reviewing approximately ten hours of footage for the episode, he and his producers made an independent editorial judgment to choose the most compelling narrative.

'The range and depth of the stories on Finding Your Roots speak for themselves.'

Sony declined to comment. Daily Mail Online has reached out to Mr Lynton.

Among the celebrities who have been dragged into the row have been Angelina Jolie, Brad Pitt and Jennifer Lawrence.