JACKSON, Miss. — Mississippi lawmakers on Tuesday passed the final version of a bill that says state and local governments cannot put a substantial burden on religious practices, a measure that sparked debate about possible discrimination against gay people and other groups.

An early version of the bill, considered weeks ago, was similar to one that Arizona’s Republican governor, Jan Brewer, vetoed after business groups said it could hurt that state’s economy.

Supporters say the final version of the Mississippi bill bears little resemblance to the failed Arizona measure. But opponents were skeptical and said the law could still prompt people to cite religious beliefs in taking actions that discriminate against gay people, women or those of different racial backgrounds or faiths.

“We don’t have a lot of good will out there in the country to fall back on when it comes to a record against discrimination,” said Sen. David Blount, D-Jackson, citing Mississippi’s troubled racial history.

Senate Bill 2681 is called the Mississippi Religious Freedom Restoration Act, and its main sponsor is Republican Sen. Phillip Gandy of Waynesboro, a Baptist pastor.

“It protects Christians in the state from discrimination,” Rep. Andy Gipson, R-Braxton, who is also a Baptist pastor, told his House colleagues.

The bill passed the House 79-43 and the Senate 37-14, with opposition coming from many Democrats, but not all of them. It goes to Republican Gov. Phil Bryant, who said Monday that he plans to sign it into law.

The bill also would add “In God We Trust” to the state seal, as Bryant requested.

The American Civil Liberties Union and the Human Rights Campaign issued statements criticizing the bill.

“Even though the Mississippi Legislature removed some of the egregious language from Arizona’s infamous SB 1062, we are disappointed that it passed this unnecessary law and ignored the national, public outcry against laws of this nature,” Eunice Rho, advocacy and policy counsel with the ACLU, said in a news release.

Sarah Warbelow, state legislative director for Human Rights Campaign, said the bill “has the effect of making LGBT people strangers to the law.”

Tony Perkins, president of the Washington-based conservative group Family Research Council, praised the bill.

“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,” Perkins said.

“Senate Bill 2681 would promote discrimination against LGBT individuals and families in Mississippi. As a minister, it’s clear that this extreme bill is about legalizing discrimination, not protecting religious freedom,” said Rev. Jasmine Beach-Ferrara, Executive Director of the Campaign for Southern Equality, an advocacy group which promotes LGBT rights across the southern U.S.

“Furthermore, the broad implications of this bill could result in discrimination aimed toward many communities,” said Beach-Ferrara.

Associated Press contributed to this report.