Correction: An earlier version of this post linked to the wrong version of the bill that passed. The corrected link is below.

Mississippi legislators on Tuesday took up and quickly passed a controversial religious freedom bill that could allow state residents to sue over laws they say place a substantial burden on their religious practices.

Supporters of the measure [pdf] say it would protect religious freedoms, while opponents say it could be used to discriminate against gays and lesbians. A similar bill that passed Arizona’s legislature earlier this year, but Gov. Jan Brewer (R) vetoed it after the bill drew loud protests from gay rights and civil liberties groups.

The Mississippi version was on life support after two earlier versions missed key deadlines, but legislators resurrected it in a conference committee last week. That committee stripped out some of the language that civil rights groups objected to. The House and Senate, both of which are controlled by Republicans, took up identical versions on Tuesday and passed them by wide margins.

The two sides disagree on whether the version passed Tuesday would allow discrimination against gays and lesbians on religious grounds. Another provision of the bill will add the words “In God We Trust” to the state flag, a priority of Gov. Phil Bryant’s (R). Bryant said earlier this month he would sign a previous version of the legislation.

“This is a victory for the First Amendment and the right to live and work according to one’s conscience,” Tony Perkins, president of the conservative Family Research Council, said in a statement applauding the vote. “This commonsense measure was a no-brainer for freedom, and like the federal [Religious Freedom Restoration Act], it simply bars government discrimination against religious exercise. The legislature gave strong approval to a bill that declares that individuals do not have to trade their religious freedom for entrance into public commerce.”

Despite the removal of some of the strongest language, the ACLU said it continues to oppose the bill.

“We remain hopeful that courts throughout the state will reject any attempts to use religion to justify discrimination,” Jennifer Riley-Collins, executive director of Mississippi’s ACLU chapter, said in her own statement. “Nobody should be refused service because of who they are.”

Similar bills are pending in Missouri and Oklahoma, where legislators are likely to take them up in coming months. Legislators in North Carolina are also likely to bring up a religious freedom measure when it opens in May.

Religious freedom laws are on the books in 18 states, and until earlier this year, when the Arizona measure sparked national outrage, few legislators raised any objections to the measures. When the Mississippi version passed the Senate for the first time in January, before the debate over the Arizona bill, every member voted in favor of it.