Gay political canvassers can soften the opinions of voters opposed to same-sex marriage by having a brief face-to-face discussion about the issue, researchers reported Thursday. The findings could have implications for activists and issues across the political spectrum, experts said.

Psychologists have long suspected that direct interaction, like working together, can reduce mutual hostility and prejudice between differing groups, whether blacks and whites or Christians and Muslims. But there is little evidence that the thaw in attitudes is a lasting one.

The study, published Thursday by the journal Science, suggests that a 20-minute conversation about a controversial and personal issue — in this case a gay person talking to voters about same-sex marriage — can induce a change in attitude that not only lasts, but may also help shift the views of others living in the same household. In other words, the change may be contagious. Researchers have published similar findings previously, but nothing quite as rigorous has highlighted the importance of the messenger, as well as the message.

“I am very impressed with this paper,” said Todd Rogers, an assistant professor of public policy at Harvard’s Kennedy School of Government and a founding director of the Analyst Institute, a voter research group that helps Democratic candidates. Mr. Rogers, who was not involved in the research, said: “There’s a whole infrastructure across the political spectrum devoted to changing people’s attitude and beliefs on important topics, and this has obvious implications. You want a messenger for whom the issue is of personal relevance.”