A new study revealed that teens living in states that have legalized same-sex marriage were less likely to attempt suicide.

The study, published in the journal JAMA Pediatrics showed a link between the legalization of same-sex marriage in some states and the drop of suicide rates among teens in the same area.

''Policy makers need to be aware that policies on sexual minority rights can have a real effect on the mental health of adolescents,'' said lead author Julia Raifman, Sc.D., of the Johns Hopkins Bloomberg School of Public Health, in a report from Boston Globe. 'We can all agree that reducing adolescent suicide attempts is a good thing, regardless of our political views.''

For the study, the researchers analyzed the data of 762,678 students who participated in CDC's annual Youth Risk Behavior Surveillance System between 1999 and January 2015. The participants include those who live in 32 states that legalized same-sex marriage between 2004 and 2015 and those who reside in 15 states without policies permitting same-sex marriage.

The researchers compared the rate of suicide attempts before and after the legalization of same-sex marriage. Prior to the implementation of policies allowing same-sex marriage, about 8.6 percent of all high school students and 28.5 percent of 231,413 students who identified as sexual minorities, such as gays and lesbians, reported attempting suicide at least once.

In states that legalized same-sex marriage, the overall percentage of students attempting suicide dropped from 8.6 percent to 8.0 percent. The 0.6 percent reduction represents a 7 percent dropped in the proportion of all high school students that attempted suicide within the past year.

Among the sexual minorities in states that legalized same-sex marriage, the rates of suicide attempt dropped from 28.5 percent to 24.5 percent. On the other hand, the researchers observed no change in the rates of suicide in teens living in states that have no policies allowing same-sex marriage.

Due to the nature of the study, which solely relied on self-reporting, the researchers noted that their study is limited. Additionally, their research did not account other factors outside same-sex marriage that might have influenced the drop in suicide rates, including socioeconomic status, religious affiliation and acceptance of the community.