The Mississippi Senate on Wednesday approved a so-called religious freedom bill that broadly protects opponents of marriage equality.

House Bill 1523 cleared the upper chamber with a 30-17 vote. A second vote, considered a formality, is expected later this week.

The Mississippi House overwhelmingly approved the bill in February, but a slight change in the Senate version means another vote must be taken.

Republican Governor Phil Bryant is expected to sign the bill into law.

House Bill 1523 would protect individuals – a broad category which could include certain businesses – who act on their religious objections to marriage equality and transgender people. It would protect people who believe that “sexual relations are properly reserved” for married heterosexual couples and that a person's sex is “objectively determined by anatomy and genetics at time of birth.”

In comments to BuzzFeed News, Erik Fleming, director of advocacy and policy for the ACLU of Mississippi, called the bill “very dangerous” because it “basically sanctions religious discrimination.”

The vote comes as North Carolina faces increasing pressure from the business community and rights groups to repeal a similar bill approved during a one-day special session.

(Related: Tim Cook, Marc Benioff, Sundar Pichai call on North Carolina to repeal anti-gay bill.)