New York Governor Andrew Cuomo has reached an agreement with lawmakers on provisions in a gay marriage bill shielding religious organizations who refuse to recognize gay marriage, overcoming a central obstacle to the bill getting a vote.

The question of exemptions for religious organizations had emerged as the main impasse in securing a floor vote for the legislation, although the prospects of a vote occuring remained unclear as Senate Republicans continued to discuss the bill in a closed-door meeting. Two Republican senators and all but one Democrat have proclaimed their support for the bill, leaving the measure one vote short of passage. The Democatic controlled Assembly passed its version of the bill last week.

Republican senators had expressed reservations that religious organizations would face legal action if they refused to provide services to same-sex married couples, from clergy declining to oversee marriages to religiously affiliated charities balking at allowing same-sex couples to adopt.

Supporters of the bill who are anxious to get a vote expressed frustration earlier Friday, saying that Republican lawmakers have been stalling and obstructing the democratic process.