Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The Mississippi Senate voted Wednesday evening to pass a religious freedom bill which some say could have sweeping anti-LGBT repercussions for the United States.

The Republican-dominated Senate voted 31-17 to pass the controversial bill, called the “Protecting Freedom of Conscience From Government Discrimination Act.”

The legislation says that businesses, social workers and public employees cannot be punished for denying services based on the belief that marriage is between a man and a woman or that “sexual relations are properly reserved to such a marriage.” It also protects individuals who believe gender is determined at birth.

Meridian resident Nykolas Alford waves a rainbow-colored flag designed with the U.S. flag during a Human Rights Campaign protest of House Bill 1523 on the Mississippi State Capitol steps in Jackson, Miss., on March 29. Justin Sellers / The Clarion-Ledger via AP

According to the bill, the government would not be allowed to prevent organizations from refusing to marry a same-sex couple, from firing an individual whose “conduct or religious beliefs are inconsistent with those of the religious organization” or from blocking the adoption of a child because of religious beliefs.

Republican Sen. Chris McDaniel said Wednesday it protects the civil liberties of Mississippi residents from government interference.

Related: A Rushed Vote Draws North Carolina Into National Fight Over LGBT Rights

"Why not preserve the first amendment? Why not preserve the civil liberties that should have always been preserved, not necessarily by individual actors but by state action, limit the power of the state, control those passions?" he said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

But some opponents, such as Sen. John Horhn, said the bill would be a stain on Mississippi’s reputation.

"Where does this all end? Why do we keep doing this to ourselves, Mississippi? And we wonder why the rest of the world thinks so badly of us. It's because of some things that we do that are unjust," he said.

The bill passed the Mississippi House 80-39 in February, but now heads back to the House before the legislation goes to the governor’s desk.

Mississippi Gov. Phil Bryant has not said whether he will veto the legislation if passed by the House.

“The governor will review the legislation if and when it reaches his desk,” Clay Chandler, a spokesman for Bryant, told NBC News Thursday.

Bryant told NBC station WLBT last week that he didn’t believe the legislation was discriminatory.

"I think it gives some people, as I appreciate it, the right to be able to say that's against my religious beliefs and I don't need to carry out that particular task," Bryant told the station.

Mississippi Lieutenant Gov. Tate Reeves expressed his support for the bill in a statement on Wednesday.

“In the wake of last year’s U.S. Supreme Court decision, many Mississippians, including pastors, wanted protection to exercise their religious liberties,” Reeves said. “This bill simply protects those individuals from government interference when practicing their religious beliefs.”

Mississippi is the latest battleground state to become embroiled in the fight over LGBT rights following the Supreme Court ruling that made same-sex marriage legal.

On Monday, Georgia Gov. Nathan Deal announced he would veto a controversial bill that would have allowed businesses and clergy to refuse services to people based on their religious opposition to same-sex marriage. Meanwhile, in North Carolina, a coalition of civil rights groups sued Gov. Pat McCrory who signed a law that blocked the city of Charlotte's attempt to extend LGBT protections.

In Mississippi, LGBT rights groups spoke out against the bill, saying it would undermine equal rights.

“Freedom of religion is one of our most fundamental rights as Americans, but that freedom does not give any of us the right to harm or mistreat others,” the ACLU of Mississippi said in a statement. “Legislators have gone out of their way to stigmatize and marginalize same sex couples by pushing this legislation. The Mississippi State Legislature should look for ways to bring Mississippians together, not divide us along religious lines. The ACLU of Mississippi urges the state legislature to kill this divisive bill in conference.”

Human Rights Campaign president Chad Griffin echoed the ACLU, saying the legislation would undermine equality in the state and could result in backlash from businesses.

Related: Corporate Boycotts Become Key Weapon in Gay Rights Fight

“Governor Byrant should be paying close attention to the backlash against discrimination in Georgia, where Gov. Nathan Deal vetoed a terrible anti-LGBT bill, and in North Carolina, where fair-minded people and the broader business community are calling on state leaders to repudiate and repeal the discriminatory law passed last week,” Griffin said in a statement. “Mississippi’s economy and its reputation hang in the balance.”