Nearly seven years after the Supreme Court declared same-sex marriage to be the law of the land, New Jersey enacted legislation on Monday to safeguard this relatively new right throughout the Garden State.

Prior to the Supreme Court’s landmark decision in Obergefell v. Hodges, which legalized sex marriage across the country in 2015, New Jersey’s state courts had already overturned a ban on same-sex marriage in 2013.

However, as a majority of the Supreme Court’s conservative justices appeared to be open to overturning Roe v. Wade last month, new concerns that the court might reverse its decision in Obergefell have prompted some lawmakers to enshrine same-sex marriage in state law.

The bill was passed by both chambers of the New Jersey Legislature last month, and New Jersey Gov. Phil Murphy, a Democrat, signed it into law on Monday.

Last month, the Supreme Court heard 90 minutes of oral arguments on a Mississippi law that would prohibit almost all abortions after 15 weeks of pregnancy in the state. A majority of the court’s conservative justices appeared ready to uphold the law and possibly overturn Roe v. Wade, the 1973 landmark decision that established women’s constitutional right to abortion before fetal viability, which is usually around 24 weeks.

The prospect of the 1973 ruling being overturned has sparked concerns among lawmakers and LGBTQ advocates that the justices may reverse precedent in a variety of other cases, including Obergefell.

Before the Supreme Court legalized same-sex marriage on a national scale, 37 states and U.S. territories had already passed marriage equality legislation. According to an analysis, only 19 of those had legalized the nuptials through state legislation. As a result, if the Supreme Court overturns Obergefell, same-sex marriage would be illegal in the majority of the country and dangerous in states where it is not explicitly prohibited by law.

In response to the Supreme Court’s oral arguments on reproductive rights, Thompson and fellow West Virginia Del. Danielle Walker — the Legislature’s only out LGBTQ lawmakers — said they will introduce a bill this month to codify same-sex marriage into law, similar to the legislation passed by New Jersey this week. West Virginia legalized same-sex marriage through litigation in 2014, but the right was never enshrined in law.

While the court’s apparent willingness to overturn Roe v. Wade has alarmed some state legislators, lawyers who argued for gay rights in landmark LGBTQ cases dismissed the notion that the high court would overturn the same-sex marriage decision even if given the chance.

Obergefell was “constitutionally correct,” according to Bonauto, because the court has repeatedly stated that “marriage is a choice for the individual to make, not the government,” and that it is “part of equality.”

Over the last several decades, the Supreme Court has struck down laws that attempted to bar people from marrying based on their race, criminal history, or ability to pay child support payments.

Paul Smith, who argued for gay rights in the 2003 case Lawrence v. Texas, which overturned state laws criminalizing consensual same-sex activity, agreed with Bonauto, saying it is “unlikely” that the court would overturn Obergefell because it is “incredibly popular.”

According to a June Gallup Poll, support for same-sex marriage among Americans reached an all-time high last year, with 70 percent of Americans — including a majority of conservatives — in favor.

Regardless, following the Supreme Court’s rejection of Kim Davis’ appeal, a former Kentucky county clerk who denied marriage licenses to same-sex couples, two of the court’s conservative justices, Clarence Thomas and Samuel Alito, issued a blistering rebuke of the Obergefell ruling and signaled that they would be open to overturning it in 2020.

Some legal experts cited this statement, as well as some of the court’s more recent rulings involving same-sex couples, as proof that marriage equality is still in jeopardy.

In Masterpiece Cakeshop v. Colorado Civil Rights Commission, the court issued a narrow ruling in favor of a Colorado baker who refused to make a cake for a same-sex wedding. In Fulton v. City of Philadelphia, a Catholic adoption agency sought an exemption from Philadelphia’s nondiscrimination law, which would have required the agency to allow LGBTQ couples to adopt.