JACKSON — Mississippi lawmakers yesterday 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 they still worried a law could 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. Gandy said it mirrors a federal law signed by President Bill Clinton more than 20 years ago — one that the craft-store chain Hobby Lobby is using to support its arguments against providing contraception coverage under a federal health overhaul signed by President Barack Obama.

“It protects Christians in the state from discrimination,” Rep. Andy Gipson, R-Braxton, who’s 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.

Jimmy Porter, executive director of the Christian Action Commission, which is the lobbying arm of the state’s influential Southern Baptist convention; and the Rev. David T. Tipton Jr., superintendent of the Mississippi District of the United Pentecostal Church, signed a letter left on senators’ desks Tuesday. They urged support for the bill and said: “Opponents of this bill, though numerous and loud, are primarily out-of-state, anti-religious special interest groups.” They also said Mississippi is “one of, if not the most, Bible-minded states in America.”

“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.