Correction appended, Feb. 11

Kansas lawmakers passed a bill Tuesday that would permit businesses and government employees to deny service to same-sex couples on the basis of their religious principles. The measure passed an initial vote in the house by a significant margin, 72 votes to 42 votes, and if it passes a final vote set for Wednesday, the bill will be considered by the Republican-controlled state senate.

State lawmakers engaged in heated debate over House Bill 2453, which would allow hotels, restaurants and stores in the state to refuse to serve gay couples if “it would be contrary to their sincerely held religious beliefs.” The bill would also allow government clerks to refuse to sign same-sex marriage licenses without threat of a lawsuit.

If a government employee chooses to refuse service, the bill states that the government must attempt to provide another employee to “promptly” provide that service “if it can be done without undue hardship to the employer.”

This bill is part of a larger trend across the U.S., pitting gay rights advocates against conservatives who say same-sex marriage is contrary to their religious beliefs. A baker in Colorado was ordered to stop discriminating against same-sex couples in December, after refusing to make a cake for a gay couple’s wedding.

Correction: A previous version of this post neglected to note the final vote required to send the bill from the house to the senate.

Write to Katy Steinmetz at katy.steinmetz@time.com.