Turns out, being out and proud is a solid strategy to combat homophobia: A new study has confirmed that for people who oppose LGBTQ equality, befriending openly gay or lesbian people can actually help challenge their convictions—and change their minds.

Daniel DellaPosta, a sociology professor at Pennsylvania State University, compared data from the ’06, ’08, and ’10 United States General Social Surveys (GSSs), collected regularly since 1972 to gauge Americans’ opinions on a wide range of social issues. DellaPosta, who identifies as gay, wanted to find empirical evidence of changing cultural attitudes toward the LGBTQ community over time, he told NBC News.

His analysis was illuminating: According to DellaPorta’s study, “Gay Acquaintanceship and Attitudes Toward Homosexuality: A Conservative Test,” GSS respondents who had one or more openly gay or lesbian friends in 2006 “exhibited greater shifts toward increased acceptance of homosexuality and gay marriage in 2008 and 2010.” In 2006, some 45% of people with a queer acquaintance supported marriage equality; by 2010, that same figure had increased to 61%.

Getty Images

DellaPorta clarified that simply seeing gay or lesbian people in public spaces or having a one-time interaction wasn’t enough to constitute the type of relationship that could affect a participant’s opinion on LGBTQ issues. But taking the “next level to mere acquaintanceship”—essentially, engaging in conversation and becoming friendly—initiates what DellaPorta calls the “contact effect.”

“When you suddenly have to interact with someone from an ’out group’ as an individual,” he told NBC News, “it forces you to reconsider your biases.”

DellaPosta’s biggest takeaway from his analysis? It’s in the same vein as the advice of civil rights pioneer Harvey Milk, who encouraged coming out as a political act: Living life as an openly queer person is actually a pretty effective way to fight bigotry.

Of course, it’s not a foolproof method; simply coming out isn’t guaranteed the change the minds of every homophobe. But DellaPosta believes he’s found proof that “broadly speaking, it works.”