A new study has found that young people who have read Harry Potter show greater acceptance of LGBT people.

Researchers from four universities joined forces to examine the attitudes of primary school, secondary school and college students, in correlation with their knowledge of J.K. Rowling’s wildly popular fiction series.

‘The greatest magic of Harry Potter: Reducing prejudice’, published in the Journal Of Applied Social Psychology, shows that the secondary school students who had read more of the novels and identified with the eponymous hero Harry displayed more tolerance towards gay people.

The other studies showed that Harry Potter had a positive impact on attitudes towards immigrants and refugees, which were categorised as groups that are similarly discriminated against.

Rowling has never been coy about the fact that Harry Potter is a thinly-veiled analogy for the civil rights struggle, and in particular the rise of Nazism, with a lot of the plot centred on conflict between ‘pure-blood’ and ‘muggle-born’ or ‘half-blood’ witches and wizards.

The protagonist Harry Potter battles the evil Lord Voldemort and his Death Eater followers to ensure that all the magical world can live in peace.

The series even includes a werewolf character to represent how HIV sufferers experience discrimination based on fear and misconceptions surrounding their disease.

The author also revealed in 2007 that she always thought of Dumbledore as gay, and has often spoken out against bigotry, saying that “homophobia is the fear of people loving”.