Former Democratic presidential candidate Hillary Clinton thinks that “Harry Potter” books have a magical touch for building compassion in young readers.

While speaking at the American Library Association conference in Chicago on Tuesday, Clinton touted reading fiction as a way of fostering empathy. She cited “years of data” and one study in particular that focused on author J.K. Rowling’s celebrated fantasy series.

“One study even found that young people who read the ‘Harry Potter’ books, which first came out 20 years ago this week, were more compassionate toward immigrants, refugees and members of the LGBT community,” Clinton told the crowd. “And so, it’s impossible for me to overstate the impact on children who see themselves in the pages of a book and are introduced to people unlike themselves.”

Former Secretary of State Hillary Clinton speaks at the American Library Association’s annual conference. (Photo: Scott Olson/Getty Images)

Though she didn’t name the study, Clinton was likely referring to an academic article published in the Journal of Applied Social Psychology in July 2014, titled: “The greatest magic of Harry Potter: Reducing prejudice.” Researchers had conducted three studies — one with elementary school children and two with high school and college students in Italy and the U.K. — to determine whether extended reading time improved attitudes toward stigmatized groups.

For the study, Loris Vezzali, a psychologist at the University of Modena and Reggio Emilia in Italy, and his colleagues read children passages from “Harry Potter” that deal with prejudice. These moments would involve characters like Draco Malfoy, a “pure-blood wizard,” calling Harry’s close friend Hermione a “Mudblood,” a derogatory term for a “Muggle-born” wizard or witch, and they show the hero’s subsequent anger at the callousness.

Clinton at the ALA conference. (Photo: Scott Olson/Getty Images)

As a control condition, the researchers would read a section not involving prejudice — such as when Harry purchases his magic wand — to another group of children.

After six weeks, both groups of children were asked about their feelings concerning children from other countries. The students who read the passage dealing with prejudice had kinder things to say.

Story continues

The researchers also said that teens and young adults who identified with Harry generally had more tolerant views toward gay people and refugees than those who did not.

Throughout her speech, which was sponsored by Simon & Schuster (the publishing house that’s releasing her forthcoming children’s book), Clinton expounded upon why she believes the world needs libraries and librarians now more than ever. She said books help shatter stereotypes, broaden perspectives and spark important conversations.

“If we’re serious about raising curious, empathetic, brave citizens, that starts with raising readers,” she said.

Read more from Yahoo News: